浏览代码

Fix FileSystem dock filter reset when tree rebuilds

kobewi 10 月之前
父节点
当前提交
cc5be8507c
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      editor/filesystem_dock.cpp

+ 4 - 0
editor/filesystem_dock.cpp

@@ -452,6 +452,10 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo
 
 
 	// Create the remaining of the tree.
 	// Create the remaining of the tree.
 	_create_tree(root, EditorFileSystem::get_singleton()->get_filesystem(), uncollapsed_paths, p_select_in_favorites, p_unfold_path);
 	_create_tree(root, EditorFileSystem::get_singleton()->get_filesystem(), uncollapsed_paths, p_select_in_favorites, p_unfold_path);
+	if (!searched_tokens.is_empty()) {
+		_update_filtered_items();
+	}
+
 	tree->ensure_cursor_is_visible();
 	tree->ensure_cursor_is_visible();
 	updating_tree = false;
 	updating_tree = false;
 }
 }