diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-24 07:05:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-24 07:09:58 +0300 |
commit | 3bb7e14618cb928d43fecf0a8930a1edd85dde3e (patch) | |
tree | 034a9f1af6a91efacd4daad56dc21302f8032225 /source/blender/editors/interface/interface_layout.c | |
parent | a93f346ff45a4ee68a45347036f135e75700caca (diff) |
UI: remove UI_BTYPE_SEARCH_MENU_UNLINK
Internal change only,
use UI_BTYPE_SEARCH_MENU with an unlink flag instead.
They are really the same button type, one just happens to have the option to unlink.
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 44c1ed474d5..eeda7a2c390 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1573,11 +1573,14 @@ void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRN /* turn button into search button */ if (searchprop) { - but->type = RNA_property_is_unlink(prop) ? UI_BTYPE_SEARCH_MENU_UNLINK : UI_BTYPE_SEARCH_MENU; + but->type = UI_BTYPE_SEARCH_MENU; but->hardmax = MAX2(but->hardmax, 256.0f); but->rnasearchpoin = *searchptr; but->rnasearchprop = searchprop; but->drawflag |= UI_BUT_ICON_LEFT | UI_BUT_TEXT_LEFT; + if (RNA_property_is_unlink(prop)) { + but->flag |= UI_BUT_SEARCH_UNLINK; + } if (RNA_property_type(prop) == PROP_ENUM) { /* XXX, this will have a menu string, |