[Bf-blender-cvs] [fc74903f272] blender2.8: Fix T59322: View Layer - Search not working
Dalai Felinto
noreply at git.blender.org
Fri Dec 14 20:14:02 CET 2018
Commit: fc74903f272a01784e0376c9ee12c2673017285d
Author: Dalai Felinto
Date: Fri Dec 14 17:03:47 2018 -0200
Branches: blender2.8
https://developer.blender.org/rBfc74903f272a01784e0376c9ee12c2673017285d
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;
```
===================================================================
M source/blender/editors/interface/interface_utils.c
===================================================================
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index d74bfe93f2f..a7787d14776 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -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)
More information about the Bf-blender-cvs
mailing list