diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-04-01 17:54:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-04-05 11:36:13 +0300 |
commit | 8e1e3e0228a6917fb368bbc7675a484941cff0ef (patch) | |
tree | 38b8d1b53db165e2b08b6e61d83a5fcf6d6d8c81 /source/blender | |
parent | f4eb7e149a0bc42b198b67e18c38d619b8e3277b (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')
-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 1bff2dd7af2..144fc5b8d68 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -3017,7 +3017,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... @@ -3038,6 +3038,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; |