[Bf-blender-cvs] [ccf40014588] master: Fix modal item open/close in the outliner since removing tweak events
Campbell Barton
noreply at git.blender.org
Wed Mar 2 12:05:09 CET 2022
Commit: ccf4001458847eb871a5d3cc5b871a62ca22ab4f
Author: Campbell Barton
Date: Wed Mar 2 21:59:14 2022 +1100
Branches: master
https://developer.blender.org/rBccf4001458847eb871a5d3cc5b871a62ca22ab4f
Fix modal item open/close in the outliner since removing tweak events
Correct check for left-mouse event which assumed the alternative was
a tweak event.
Also remove print added by accident.
===================================================================
M source/blender/editors/space_outliner/outliner_edit.cc
M source/blender/windowmanager/intern/wm_operators.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_edit.cc b/source/blender/editors/space_outliner/outliner_edit.cc
index a6ac2a5a1f3..6916f5fe502 100644
--- a/source/blender/editors/space_outliner/outliner_edit.cc
+++ b/source/blender/editors/space_outliner/outliner_edit.cc
@@ -240,7 +240,7 @@ static int outliner_item_openclose_invoke(bContext *C, wmOperator *op, const wmE
outliner_tag_redraw_avoid_rebuild_on_open_change(space_outliner, region);
/* Only toggle once for single click toggling */
- if (event->type == LEFTMOUSE) {
+ if ((event->type == LEFTMOUSE) && (event->val != KM_CLICK_DRAG)) {
return OPERATOR_FINISHED;
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 6e0bf911555..7e680af4537 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -913,7 +913,6 @@ int WM_generic_select_modal(bContext *C, wmOperator *op, const wmEvent *event)
OPERATOR_RETVAL_CHECK(ret_value);
op->customdata = POINTER_FROM_INT((int)event->type);
if (ret_value & OPERATOR_RUNNING_MODAL) {
- printf("Starting modal: %s\n", op->idname);
WM_event_add_modal_handler(C, op);
}
return ret_value | OPERATOR_PASS_THROUGH;
More information about the Bf-blender-cvs
mailing list