Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_templates.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index c7de757e2c9..e94fc2ddbab 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2816,6 +2816,12 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
}
dyn_data->items_len = dyn_data->items_shown = -1;
+ /* When active item changed since last draw, scroll to it. */
+ if (activei != ui_list->list_last_activei) {
+ ui_list->flag |= UILST_SCROLL_TO_ACTIVE_ITEM;
+ ui_list->list_last_activei = activei;
+ }
+
/* Filter list items! (not for compact layout, though) */
if (dataptr->data && prop) {
int filter_exclude = ui_list->filter_flag & UILST_FLT_EXCLUDE;