diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-27 18:39:01 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-27 18:44:49 +0300 |
commit | f57fce3534258e44958779ba2dd3ef6b8012f0fb (patch) | |
tree | c6e6a57be81f6b8eceeaecdf2247020e0d9102ec /source/blender/editors/interface/interface_utils.c | |
parent | 9d6a1b990fed1624f49262d4d57227ed438efee8 (diff) |
Revert "Add library-hint to datablock search menus."
This reverts commit 4669c3692cc4f69660c673ceccce2245d5b9fed8.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r-- | source/blender/editors/interface/interface_utils.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 80943792ce5..7400e922b30 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -37,7 +37,6 @@ #include "BLT_translation.h" -#include "BKE_library.h" #include "BKE_report.h" #include "MEM_guardedalloc.h" @@ -265,29 +264,22 @@ void ui_rna_collection_search_cb(const struct bContext *C, void *arg, const char continue; } + name = RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL); /* could use the string length here */ iconid = 0; if (itemptr.type && RNA_struct_is_ID(itemptr.type)) { - name = MEM_malloc_arrayN(MAX_ID_FULL_NAME, sizeof(*name), __func__); - BKE_id_full_name_ui_prefix_get(name, itemptr.data); iconid = ui_id_icon_get(C, itemptr.data, false); } - else { - /* could use the string length here */ - name = RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL); - } if (name) { if (skip_filter || BLI_strcasestr(name, str)) { cis = MEM_callocN(sizeof(CollItemSearch), "CollectionItemSearch"); cis->data = itemptr.data; - cis->name = name; /* Still ownership of that memory. */ + cis->name = MEM_dupallocN(name); cis->index = i; cis->iconid = iconid; BLI_addtail(items_list, cis); } - else { - MEM_freeN(name); - } + MEM_freeN(name); } i++; |