Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_select.c
| Show First 20 Lines • Show All 968 Lines • ▼ Show 20 Lines | static int sequencer_select_exec(bContext *C, wmOperator *op) | ||||
| if (seq && element_already_selected(seq, handle_clicked) && wait_to_deselect_others && !toggle) { | if (seq && element_already_selected(seq, handle_clicked) && wait_to_deselect_others && !toggle) { | ||||
| return OPERATOR_RUNNING_MODAL; | return OPERATOR_RUNNING_MODAL; | ||||
| } | } | ||||
| bool changed = false; | bool changed = false; | ||||
| /* Deselect everything */ | /* Deselect everything */ | ||||
| if (deselect_all || (seq && (extend == false && deselect == false && toggle == false))) { | if (deselect_all || (seq && (extend == false && deselect == false && toggle == false))) { | ||||
| ED_sequencer_deselect_all(scene); | // changed will be true if any sequences otherwise. If there were no sequences to deselect, changed is false. | ||||
| changed = true; | // This is done to prevent undo items from being created when an empty sequencer is selected. | ||||
| // See T94080 for details. | |||||
| changed = ED_sequencer_deselect_all(scene); | |||||
| } | } | ||||
ISS: If you agree with suggestion above, this comment won't be even necessary. | |||||
| /* Nothing to select, but strips could be deselected. */ | /* Nothing to select, but strips could be deselected. */ | ||||
| if (!seq) { | if (!seq) { | ||||
| if (changed) { | if (changed) { | ||||
| sequencer_select_do_updates(C, scene); | sequencer_select_do_updates(C, scene); | ||||
| } | } | ||||
| return changed ? OPERATOR_FINISHED : OPERATOR_CANCELLED; | return changed ? OPERATOR_FINISHED : OPERATOR_CANCELLED; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,154 Lines • Show Last 20 Lines | |||||
If you agree with suggestion above, this comment won't be even necessary.