diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-11-11 17:04:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-11 17:04:07 +0100 |
commit | d552f0f1862298039db85600c2f67de3cfdcb227 (patch) | |
tree | 2d4e9b894ebe090a80fab78f1decaf69e977d263 | |
parent | b81356e1e306771f45adabe0f7364de32ae525f6 (diff) | |
parent | 107c1969f5cb594a7dbde807708498e490fd4a0f (diff) |
Merge pull request #33545 from YeldhamDev/filesys_mainscn_not_current
Hide "Set As Main Scene" in FileSystem dock if the scene is already the main one
-rw-r--r-- | editor/filesystem_dock.cpp | 4 |
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); } |