WM: check modal handlers for keymap lookups

Keep in sync with 2.8x
This commit is contained in:
Campbell Barton 2018-05-25 10:51:05 +02:00
parent e31b8303ed
commit 9812943931
1 changed files with 8 additions and 2 deletions

View File

@ -1190,8 +1190,14 @@ static wmKeyMapItem *wm_keymap_item_find_props(
wmKeyMapItem *found = NULL;
/* look into multiple handler lists to find the item */
if (win)
found = wm_keymap_item_find_handlers(C, &win->handlers, opname, opcontext, properties, is_strict, is_hotkey, r_keymap);
if (win) {
found = wm_keymap_item_find_handlers(
C, &win->modalhandlers, opname, opcontext, properties, is_strict, is_hotkey, r_keymap);
if (found == NULL) {
found = wm_keymap_item_find_handlers(
C, &win->handlers, opname, opcontext, properties, is_strict, is_hotkey, r_keymap);
}
}
if (sa && found == NULL)
found = wm_keymap_item_find_handlers(C, &sa->handlers, opname, opcontext, properties, is_strict, is_hotkey, r_keymap);