diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-06 22:55:12 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-06 22:56:38 +0300 |
commit | 2b1843c491c8caaaa08956e2edc1c6096c938839 (patch) | |
tree | 9c7c03b7d4c0c54189e1590f6594318df951b74c /source/blender/editors/interface | |
parent | 5c18393c8ee9d72e1fe5e8fc6edac569d0a4f13a (diff) |
Fix broken shortcuts in F3 'operator search' menu.
From own changes in that area... Now we also enforce handling shortcuts
in case relevant drawflag of searchbutton is set. Should allow to cover
all cases, hopefully.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_region_search.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_region_search.c b/source/blender/editors/interface/interface_region_search.c index 471055ed24a..48d59830c2a 100644 --- a/source/blender/editors/interface/interface_region_search.c +++ b/source/blender/editors/interface/interface_region_search.c @@ -534,8 +534,9 @@ ARegion *ui_searchbox_create_generic(bContext *C, ARegion *butregion, uiBut *but } /* Only show key shortcuts when needed (checking RNA prop pointer is useless here, a lot of buttons are about data - * without having that pointer defined, let's rather try with optype!). */ - if (but->optype != NULL) { + * without having that pointer defined, let's rather try with optype!). One can also enforce that behavior by + * setting UI_BUT_HAS_SHORTCUT drawflag of search button. */ + if (but->optype != NULL || (but->drawflag & UI_BUT_HAS_SHORTCUT) != 0) { data->use_sep = true; } @@ -754,6 +755,7 @@ ARegion *ui_searchbox_create_operator(bContext *C, ARegion *butregion, uiBut *bu { ARegion *ar; + UI_but_drawflag_enable(but, UI_BUT_HAS_SHORTCUT); ar = ui_searchbox_create_generic(C, butregion, but); ar->type->draw = ui_searchbox_region_draw_cb__operator; |