diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-17 08:22:33 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-17 08:22:33 +0300 |
commit | 3017585ebfe84852f6969493badc77e27fdb8b54 (patch) | |
tree | db7be6da5b87bb864ab6599c9789f52b98a3ed6b /source/blender/editors | |
parent | 859c062a2a3083f53d801fce4b722dcc52482e7e (diff) |
View 3D: the select operator now uses the cancel flag on failure
Needed so mapping selection to click doesn't pass the click event
through to setting the 3D cursor for e.g.
While this doesn't happen with the default key-map, setting selection
to LMB-click would set the 3D cursor as well (when the selection
fell through to nothing).
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 6a524be3b9e..f635bcf52b8 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2832,13 +2832,16 @@ static int view3d_select_exec(bContext *C, wmOperator *op) changed = ed_object_select_pick(C, mval, ¶ms, center, enumerate, object); } + /* Pass-through flag may be cleared, see #WM_operator_flag_only_pass_through_on_press. */ + /* Pass-through allows tweaks * FINISHED to signal one operator worked */ if (changed) { WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); return OPERATOR_PASS_THROUGH | OPERATOR_FINISHED; } - return OPERATOR_PASS_THROUGH; /* nothing selected, just passthrough */ + /* Nothing selected, just passthrough. */ + return OPERATOR_PASS_THROUGH | OPERATOR_CANCELLED; } static int view3d_select_invoke(bContext *C, wmOperator *op, const wmEvent *event) |