forked from bartvdbraak/blender
Commit r33378 adds a red alert to search buttons which have items which are not in the list.
Disable this for pointer buttons since this was intended for vgroups & uvlayers. Pointer buttons often reference ID's which can be in the 1000+, lookups like this on each button draw is not useful since invalid pointers here will likely crash on scene evaluation.
This commit is contained in:
parent
dcb26e4e47
commit
2b90eb18e2
@ -1091,9 +1091,17 @@ void ui_searchbox_free(bContext *C, ARegion *ar)
|
||||
/* XXX weak: search_func adds all partial matches... */
|
||||
void ui_but_search_test(uiBut *but)
|
||||
{
|
||||
uiSearchItems *items= MEM_callocN(sizeof(uiSearchItems), "search items");
|
||||
uiSearchItems *items;
|
||||
int x1;
|
||||
|
||||
|
||||
/* possibly very large lists (such as ID datablocks) only
|
||||
* only validate string RNA buts (not pointers) */
|
||||
if(but->rnaprop && RNA_property_type(but->rnaprop) != PROP_STRING) {
|
||||
return;
|
||||
}
|
||||
|
||||
items= MEM_callocN(sizeof(uiSearchItems), "search items");
|
||||
|
||||
/* setup search struct */
|
||||
items->maxitem= 10;
|
||||
items->maxstrlen= 256;
|
||||
|
Loading…
Reference in New Issue
Block a user