From 68c3728b4759f65f5ebc6d7c5ddf2157700cc1a1 Mon Sep 17 00:00:00 2001 From: volzhs Date: Thu, 9 May 2019 03:51:08 +0900 Subject: [PATCH 1/2] Revert "Merge pull request #26053 from qarmin/back_scroll_to_start" This reverts commit b5deb1dc72d8c4c92c9850379522926e60ddf7d0, reversing changes made to 2cc8848c3c3815c6f72ce5f9b75bfab8a1498292. This change causes unwanted regression. It's too risky to have scroll back to top in ItemList.clear() --- scene/gui/item_list.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index f5e979e9e60..026374ded1d 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -369,7 +369,6 @@ void ItemList::clear() { update(); shape_changed = true; defer_select_single = -1; - scroll_bar->set_value(0); } void ItemList::set_fixed_column_width(int p_size) { From 920403c489fe3b0437634538bb4e45d55ac10eab Mon Sep 17 00:00:00 2001 From: volzhs Date: Thu, 9 May 2019 04:00:40 +0900 Subject: [PATCH 2/2] Scroll back to top when changing directory in FileSystem dock Fix #26041 --- editor/filesystem_dock.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 6248680a52c..97ff5160554 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -462,6 +462,7 @@ void FileSystemDock::_navigate_to_path(const String &p_path, bool p_select_in_fa _update_tree(_compute_uncollapsed_paths(), false, p_select_in_favorites); if (display_mode == DISPLAY_MODE_SPLIT) { _update_file_list(false); + files->get_v_scroll()->set_value(0); } String file_name = p_path.get_file();