浏览代码

Scroll back to top when changing directory in FileSystem dock

Fix #26041
volzhs 6 年之前
父节点
当前提交
920403c489
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      editor/filesystem_dock.cpp

+ 1 - 0
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);
 	_update_tree(_compute_uncollapsed_paths(), false, p_select_in_favorites);
 	if (display_mode == DISPLAY_MODE_SPLIT) {
 	if (display_mode == DISPLAY_MODE_SPLIT) {
 		_update_file_list(false);
 		_update_file_list(false);
+		files->get_v_scroll()->set_value(0);
 	}
 	}
 
 
 	String file_name = p_path.get_file();
 	String file_name = p_path.get_file();