Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-04-29 17:56:14 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-04-30 12:34:22 +0300
commit080d72a25787aa860141cdbc64d6eed620d11245 (patch)
tree8b5439f01a0a58003528d90c82b292fdbbd2887e /source/blender
parente4b9836c535a51ecd0dcdddefda80f805a214dd3 (diff)
Select: change Sequencer to match new behavior of 'deselect on nothing'.
Note that unlike some others, this is always enabled for sequencer, since previous (2.7x) code was already deselecting everything when clicking in an empty area... Part of T63995.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index a193171f784..5ada34fc791 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -318,6 +318,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e
Scene *scene = CTX_data_scene(C);
Editing *ed = BKE_sequencer_editing_get(scene, false);
const bool extend = RNA_boolean_get(op->ptr, "extend");
+ const bool deselect_all = RNA_boolean_get(op->ptr, "deselect_all");
const bool linked_handle = RNA_boolean_get(op->ptr, "linked_handle");
const bool linked_time = RNA_boolean_get(op->ptr, "linked_time");
int left_right = RNA_enum_get(op->ptr, "left_right");
@@ -401,15 +402,13 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e
}
}
else {
- // seq = find_nearest_seq(scene, v2d, &hand, mval);
-
act_orig = ed->act_seq;
- if (extend == 0 && linked_handle == 0) {
- ED_sequencer_deselect_all(scene);
- }
-
if (seq) {
+ if (!extend && !linked_handle) {
+ ED_sequencer_deselect_all(scene);
+ }
+
BKE_sequencer_active_set(scene, seq);
if ((seq->type == SEQ_TYPE_IMAGE) || (seq->type == SEQ_TYPE_MOVIE)) {
@@ -535,6 +534,9 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e
select_linked_time(ed->seqbasep, seq);
}
}
+ else if (deselect_all) {
+ ED_sequencer_deselect_all(scene);
+ }
}
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene);
@@ -566,7 +568,14 @@ void SEQUENCER_OT_select(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
+ PropertyRNA *prop;
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection");
+ prop = RNA_def_boolean(ot->srna,
+ "deselect_all",
+ false,
+ "Deselect On Nothing",
+ "Deselect all when nothing under the cursor");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
RNA_def_boolean(
ot->srna, "linked_handle", 0, "Linked Handle", "Select handles next to the active strip");
/* for animation this is an enum but atm having an enum isn't useful for us */