diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-09-21 10:18:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-09-21 10:26:21 +0300 |
commit | 52bfa750e74952ddd4e8223d92d21140831902a7 (patch) | |
tree | 452ae89384d36eea827edb83b2e4e0f846491666 /source/blender/editors/space_view3d/view3d_select.c | |
parent | 5eb505e3682260d47b319b56d8d56310de766cab (diff) |
WM: only return PASS_THROUGH on PRESS for selection operators
Some selection operators return (PASS_THROUGH & FINISHED) so the tweak
event isn't suppressed from the PRESS event having been handled.
This is now restricted to events with a PRESS action.
Without this, using CLICK for selection was passing the event through
which could run other actions unintentionally.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 3f572bf9d5a..39aed131ea1 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2813,7 +2813,9 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, const wmEvent *even { RNA_int_set_array(op->ptr, "location", event->mval); - return view3d_select_exec(C, op); + const int retval = view3d_select_exec(C, op); + + return WM_operator_flag_only_pass_through_on_press(retval, event); } void VIEW3D_OT_select(wmOperatorType *ot) |