Fix T59322: View Layer - Search not working

Basically uiRNACollectionSearch->but_changed was always NULL for the
search templates. So skip_filter would always be true, and we would
never filter.

An alternative fix would be to add the following to the begin of
`template_search_add_button_searchmenu`:
```
static bool always_true = true;
template_search->search_data.but_changed = &always_true;
```
This commit is contained in:
Dalai Felinto
2018-12-14 17:03:47 -02:00
parent f6f46accfe
commit fc74903f27

View File

@@ -255,7 +255,7 @@ void ui_rna_collection_search_cb(const struct bContext *C, void *arg, const char
int i = 0, iconid = 0, flag = RNA_property_flag(data->target_prop);
ListBase *items_list = MEM_callocN(sizeof(ListBase), "items_list");
CollItemSearch *cis;
const bool skip_filter = !(data->but_changed && *data->but_changed);
const bool skip_filter = (data->but_changed && !(*data->but_changed));
/* build a temporary list of relevant items first */
RNA_PROP_BEGIN (&data->search_ptr, itemptr, data->search_prop)