diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-24 03:34:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-24 05:41:18 +0300 |
commit | c46dcdf8871e7404516a234087cfc4bf4e2794d0 (patch) | |
tree | ca5f6d549a3294441a452ae04507e46360324bad /source/blender/editors/space_outliner | |
parent | 94b8166a8b0519aef76e8cb8d0c9a6035fe04baf (diff) |
UI: add menu search functionality to operator search menu
This has some advantages over operator search:
- Some operators need options set to be usefully accessed.
- Shows key bindings to access menus
(for actions that don't have key bindings themselves).
- Non operator actions such as check-boxes are also shown.
- Menu items can control execution context, using invoke or execute
where appropriate so we can control how the operator runs.
Part of the design task T74157.
This can be tested using the 'Experimental' preferences section
or selected in the key-map editor.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 768ec17c1e7..12be08550af 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -528,7 +528,7 @@ static void merged_element_search_cb_recursive( /* Don't allow duplicate named items */ if (UI_search_items_find_index(items, name) == -1) { - if (!UI_search_item_add(items, name, te, iconid)) { + if (!UI_search_item_add(items, name, te, iconid, 0)) { break; } } @@ -589,7 +589,7 @@ static uiBlock *merged_element_search_menu(bContext *C, ARegion *region, void *d but = uiDefSearchBut( block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 10, menu_width, UI_UNIT_Y, 0, 0, ""); UI_but_func_search_set( - but, NULL, merged_element_search_cb, data, false, merged_element_search_call_cb, NULL); + but, NULL, merged_element_search_cb, data, NULL, merged_element_search_call_cb, NULL); UI_but_flag_enable(but, UI_BUT_ACTIVATE_ON_INIT); /* Fake button to hold space for search items */ |