Fix T97277: Tweak drag transforming is broken for masks (RMB select)

Regression in 4d0f846b93,
passing selection through to drag relied on tweak events running
even when the press event was handled which is not the case for drag.
This commit is contained in:
Campbell Barton 2022-04-22 17:35:37 +10:00
parent b226236b01
commit 048c769774
Notes: blender-bot 2023-02-14 11:21:43 +01:00
Referenced by issue #98765, Regression: Unable to select mask points in clip editor
Referenced by issue #97545, EEVEE Viewport Shading crash (3.2.0 Alpha)
Referenced by issue #97277, Regression: Tweak drag transforming is broken for masks (RMB select)
Referenced by issue #97233, Gpu cycles rendering broken with hair particles
1 changed files with 6 additions and 4 deletions

View File

@ -319,7 +319,7 @@ static int select_exec(bContext *C, wmOperator *op)
ED_mask_view_lock_state_restore_no_jump(C, &lock_state);
return OPERATOR_FINISHED;
return OPERATOR_PASS_THROUGH | OPERATOR_FINISHED;
}
MaskSplinePointUW *uw;
@ -361,14 +361,14 @@ static int select_exec(bContext *C, wmOperator *op)
ED_mask_view_lock_state_restore_no_jump(C, &lock_state);
return OPERATOR_FINISHED;
return OPERATOR_PASS_THROUGH | OPERATOR_FINISHED;
}
if (deselect_all) {
/* For clip editor tracks, leave deselect all to clip editor. */
if (!ED_clip_can_select(C)) {
ED_mask_deselect_all(C);
ED_mask_view_lock_state_restore_no_jump(C, &lock_state);
return OPERATOR_FINISHED;
return OPERATOR_PASS_THROUGH | OPERATOR_FINISHED;
}
}
@ -386,7 +386,9 @@ static int select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
RNA_float_set_array(op->ptr, "location", co);
return select_exec(C, op);
const int retval = select_exec(C, op);
return WM_operator_flag_only_pass_through_on_press(retval, event);
}
void MASK_OT_select(wmOperatorType *ot)