浏览代码

Folders in FileSystem are not expanded on project save anymore

If an item was selected in the FileSystem dock and its parent
was collapsed the folder would be expanded when saving the project.
Silvano Cerza 6 年之前
父节点
当前提交
469acbfd0c
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      editor/filesystem_dock.cpp

+ 1 - 5
editor/filesystem_dock.cpp

@@ -71,11 +71,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
 		subdirectory_item->select(0);
 		subdirectory_item->select(0);
 	}
 	}
 
 
-	if ((path.begins_with(lpath) && path != lpath)) {
-		subdirectory_item->set_collapsed(false);
-	} else {
-		subdirectory_item->set_collapsed(uncollapsed_paths.find(lpath) < 0);
-	}
+	subdirectory_item->set_collapsed(uncollapsed_paths.find(lpath) < 0);
 	if (searched_string.length() > 0 && dname.to_lower().find(searched_string) >= 0) {
 	if (searched_string.length() > 0 && dname.to_lower().find(searched_string) >= 0) {
 		parent_should_expand = true;
 		parent_should_expand = true;
 	}
 	}