Sequencer: use pass-through for preview select

Needed for select-drag action as done in the 3D view and UV editor.
This commit is contained in:
Campbell Barton 2021-10-06 14:45:27 +11:00
parent 0e590f9078
commit 9161993e02
1 changed files with 11 additions and 1 deletions

View File

@ -801,6 +801,16 @@ static int sequencer_select_exec(bContext *C, wmOperator *op)
return ret_value;
}
static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
const int retval = WM_generic_select_invoke(C, op, event);
ARegion *region = CTX_wm_region(C);
if (region && (region->regiontype == RGN_TYPE_PREVIEW)) {
return WM_operator_flag_only_pass_through_on_press(retval, event);
}
return retval;
}
void SEQUENCER_OT_select(wmOperatorType *ot)
{
PropertyRNA *prop;
@ -812,7 +822,7 @@ void SEQUENCER_OT_select(wmOperatorType *ot)
/* Api callbacks. */
ot->exec = sequencer_select_exec;
ot->invoke = WM_generic_select_invoke;
ot->invoke = sequencer_select_invoke;
ot->modal = WM_generic_select_modal;
ot->poll = ED_operator_sequencer_active;