diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-04-01 17:54:01 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-04-01 17:55:34 +0300 |
commit | 8e6d6cc4dc2b19b6d9db42a1c9057fdf8c6c5404 (patch) | |
tree | 2fd76c2e5cb662e4a95a4cdcabe674b84d7f5c69 /source/blender/editors/interface/interface_templates.c | |
parent | a9cd97673deb4056a417cfd74fce1049e4aff5e4 (diff) |
Fix T48001: Highlighting selected item in filtered lists.
active index was not reset to 'nothing' in case actual active item was filtered out.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 9f98c0dea30..a47d60812b4 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -3023,7 +3023,7 @@ void uiTemplateList( /* So that we do not map again activei! */ activei_mapping_pending = false; } -# if 0 /* For now, do not alter active element, even if it will be hidden... */ +#if 0 /* For now, do not alter active element, even if it will be hidden... */ else if (activei < i) { /* We do not want an active but invisible item! * Only exception is when all items are filtered out... @@ -3044,6 +3044,11 @@ void uiTemplateList( i++; } RNA_PROP_END; + + if (activei_mapping_pending) { + /* No active item found, set to 'invalid' -1 value... */ + activei = -1; + } } if (dyn_data->items_shown >= 0) { len = dyn_data->items_shown; |