Commit: 8e1e3e0228a6917fb368bbc7675a484941cff0ef
Author: Bastien Montagne
Date: Fri Apr 1 16:54:01 2016 +0200
Branches: blender-v2.77-release
https://developer.blender.org/rB8e1e3e0228a6917fb368bbc7675a484941cff0ef
Fix T48001: Highlighting selected item in filtered lists.
active index was not reset to 'nothing' in case actual active item was filtered
out.
===================================================================
M source/blender/editors/interface/interface_templates.c
===================================================================
diff --git a/source/blender/editors/interface/interface_templates.c
b/source/blender/editors/interface/interface_templates.c
index 1bff2dd..144fc5b 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;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs