From 8a2fdb3749d74fa34243c0a53b173eb330962d62 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 25 Jul 2017 20:17:54 +1000 Subject: [PATCH] Manipulator: break after an event is handled Now works the same as other event handling functions. --- .../windowmanager/intern/wm_event_system.c | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) 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; }