diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-15 11:32:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-15 12:06:07 +0300 |
commit | ece7ebb3a8b880b45977db7c1915c671c90f2817 (patch) | |
tree | ee2f7585452ac757aabea20bb586d63d4b48fbf6 /source/blender/editors/interface/interface_templates.c | |
parent | fbf6eb509a71f31140746309b592fbb85e423437 (diff) |
Fix text after '|' being right aligned in the ID selector
Only use this to right align libraries when they are added to the name.
Caused by d62bbf4079323.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 7d856a51720..1ce1e2950d5 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -364,8 +364,10 @@ static bool id_search_add(const bContext *C, BKE_id_full_name_ui_prefix_get(name_ui, id, UI_SEP_CHAR); int iconid = ui_id_icon_get(C, id, template_ui->preview); + bool has_sep_char = (id->lib != NULL); - if (!UI_search_item_add(items, name_ui, id, iconid, UI_BUT_HAS_SEP_CHAR)) { + if (!UI_search_item_add( + items, name_ui, id, iconid, has_sep_char ? UI_BUT_HAS_SEP_CHAR : 0)) { return false; } } |