summaryrefslogtreecommitdiff
path: root/editor/filesystem_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r--editor/filesystem_dock.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index fa171ddb0c..fb591b51df 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -71,11 +71,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
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) {
parent_should_expand = true;
}
@@ -2151,7 +2147,9 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str
if (filenames.size() == 1) {
p_popup->add_icon_item(get_icon("Load", "EditorIcons"), TTR("Open Scene"), FILE_OPEN);
p_popup->add_icon_item(get_icon("CreateNewSceneFrom", "EditorIcons"), TTR("New Inherited Scene"), FILE_INHERIT);
- p_popup->add_item(TTR("Set As Main Scene"), FILE_MAIN_SCENE);
+ if (ProjectSettings::get_singleton()->get("application/run/main_scene") != filenames[0]) {
+ p_popup->add_icon_item(get_icon("PlayScene", "EditorIcons"), TTR("Set As Main Scene"), FILE_MAIN_SCENE);
+ }
} else {
p_popup->add_icon_item(get_icon("Load", "EditorIcons"), TTR("Open Scenes"), FILE_OPEN);
}