[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [61214] trunk/blender/source/blender/ editors/interface/interface_templates.c: uiList: fix a bug in computing visual active index (afaict, in case of reordering, was affecting "keep active visible" feature when resizing, and the " active label color" in custom themes).
Bastien Montagne
montagne29 at wanadoo.fr
Sat Nov 9 18:05:07 CET 2013
Revision: 61214
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=61214
Author: mont29
Date: 2013-11-09 17:05:07 +0000 (Sat, 09 Nov 2013)
Log Message:
-----------
uiList: fix a bug in computing visual active index (afaict, in case of reordering, was affecting "keep active visible" feature when resizing, and the "active label color" in custom themes).
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface_templates.c
Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_templates.c 2013-11-09 16:32:10 UTC (rev 61213)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c 2013-11-09 17:05:07 UTC (rev 61214)
@@ -2855,6 +2855,7 @@
items_shown = dyn_data->items_shown;
if (items_shown >= 0) {
+ bool activei_mapping_pending = true;
items_ptr = MEM_mallocN(sizeof(_uilist_item) * items_shown, AT);
//printf("%s: items shown: %d.\n", __func__, items_shown);
RNA_PROP_BEGIN (dataptr, itemptr, prop)
@@ -2875,8 +2876,10 @@
items_ptr[ii].org_idx = i;
items_ptr[ii].flt_flag = dyn_data->items_filter_flags ? dyn_data->items_filter_flags[i] : 0;
- if (activei == i) {
+ if (activei_mapping_pending && activei == i) {
activei = ii;
+ /* 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... */
else if (activei < i) {
More information about the Bf-blender-cvs
mailing list