[Bf-blender-cvs] [8a2fdb3749d] blender2.8: Manipulator: break after an event is handled
Campbell Barton
noreply at git.blender.org
Tue Jul 25 12:05:31 CEST 2017
Commit: 8a2fdb3749d74fa34243c0a53b173eb330962d62
Author: Campbell Barton
Date: Tue Jul 25 20:17:54 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB8a2fdb3749d74fa34243c0a53b173eb330962d62
Manipulator: break after an event is handled
Now works the same as other event handling functions.
===================================================================
M source/blender/windowmanager/intern/wm_event_system.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 97e92acf052..584241a0c0d 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2240,12 +2240,22 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers
CTX_wm_manipulator_group_set(C, NULL);
if (action & WM_HANDLER_BREAK) {
+ if (G.debug & (G_DEBUG_EVENTS | G_DEBUG_HANDLERS)) {
+ printf("%s: handled - and pass on! '%s'\n",
+ __func__, kmi->idname);
+ }
+ break;
+ }
+ else {
if (action & WM_HANDLER_HANDLED) {
- if (G.debug & (G_DEBUG_EVENTS | G_DEBUG_HANDLERS))
- printf("%s: handled - and pass on! '%s'\n", __func__, kmi->idname);
+ if (G.debug & (G_DEBUG_EVENTS | G_DEBUG_HANDLERS)) {
+ printf("%s: handled - and pass on! '%s'\n",
+ __func__, kmi->idname);
+ }
}
else {
- PRINT("%s: un-handled '%s'\n", __func__, kmi->idname);
+ PRINT("%s: un-handled '%s'\n",
+ __func__, kmi->idname);
}
}
}
@@ -2255,6 +2265,10 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers
PRINT("fail\n");
}
+ if (action & WM_HANDLER_BREAK) {
+ break;
+ }
+
if (is_mgroup_single) {
break;
}
More information about the Bf-blender-cvs
mailing list