diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-23 10:24:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-23 10:24:17 +0300 |
commit | 67002402bd60d701acaf9e22801bc4411ded21d7 (patch) | |
tree | 7f48c668c1ee2b018374a899a8932a0c0d7f6922 /source/blender/editors/interface/interface_templates.c | |
parent | 4b31f4ace70c8a9d2117f60e6fdf6c3448eae3f5 (diff) |
Fix T79162: 'prop_search' includes ID prefix in string properties
Regression from d6cefef98f87a
This also fixes an unreported issue where finding an exact match
wasn't being detected for items that contained an ID prefix.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 21696b9c1ab..d3487b635ce 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -367,13 +367,19 @@ static bool id_search_add(const bContext *C, /* When using previews, the library hint (linked, overridden, missing) is added with a * character prefix, otherwise we can use a icon. */ - BKE_id_full_name_ui_prefix_get(name_ui, id, use_lib_prefix, UI_SEP_CHAR); + int name_prefix_offset; + BKE_id_full_name_ui_prefix_get( + name_ui, id, use_lib_prefix, UI_SEP_CHAR, &name_prefix_offset); if (!use_lib_prefix) { iconid = UI_library_icon_get(id); } - if (!UI_search_item_add( - items, name_ui, id, iconid, has_sep_char ? UI_BUT_HAS_SEP_CHAR : 0)) { + if (!UI_search_item_add(items, + name_ui, + id, + iconid, + has_sep_char ? UI_BUT_HAS_SEP_CHAR : 0, + name_prefix_offset)) { return false; } } |