diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-07 13:31:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-07 13:36:44 +0300 |
commit | 8f8e91987b53a6ea07a3b94f7dc7689df8677600 (patch) | |
tree | 8e449becbbfa088daaeb1016f016ddc2339e99c4 | |
parent | c3ef1f8db3c420612aecf40359533cb043615208 (diff) |
Fix tool-tips remaining after operators start
It was possible for e.g. to have a header tooltip displayed,
then start walk-navigation which didn't close the tool-tip.
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index cea2f127b3e..88a4c13c4ca 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2691,6 +2691,12 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers wmKeyMap *keymap = WM_event_get_keymap_from_handler(wm, handler); action |= wm_handlers_do_keymap_with_keymap_handler( C, event, handlers, handler, keymap, do_debug_handler); + + /* Clear the tool-tip whenever a key binding is handled, without this tool-tips + * are kept when a modal operators starts (annoying but otherwise harmless). */ + if (action & WM_HANDLER_BREAK) { + WM_tooltip_clear(C, CTX_wm_window(C)); + } } else if (handler_base->type == WM_HANDLER_TYPE_UI) { wmEventHandler_UI *handler = (wmEventHandler_UI *)handler_base; |