summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorMichael Alexsander <michaelalexsander@protonmail.com>2019-11-11 12:41:46 -0300
committerMichael Alexsander <michaelalexsander@protonmail.com>2019-11-11 12:41:46 -0300
commit107c1969f5cb594a7dbde807708498e490fd4a0f (patch)
tree3ee62ee7c97d3d1eca8791e5270f04f0d599ff6c /editor
parent6b1628f9fcc50dc16af08c2b87f27108ff6e15c5 (diff)
Hide "Set As Main Scene" in FileSystem dock if the scene is already the main one
Diffstat (limited to 'editor')
-rw-r--r--editor/filesystem_dock.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index f35033e2be..fb591b51df 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -2147,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_icon_item(get_icon("PlayScene", "EditorIcons"), 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);
}