summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2020-05-22 01:55:28 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2020-05-22 17:41:09 +0200
commit6852b29658954f476530c7f07aa7cc3d262a7938 (patch)
treed10bff0258a5ef1d93358a246a815223cc2f07f1 /main
parent9239412027b6c25009efab69dc39650e0d76c56d (diff)
Fix editor ignoring 'single_window_mode' with no main scene
Previously the editor would ignore the 'single_window_mode' editor setting if the edited project didn't have a main scene configured in the project settings.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 68016a5cef..f05032e68c 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1958,6 +1958,16 @@ bool Main::start() {
ProjectSettings::get_singleton()->set_custom_property_info("rendering/canvas_textures/default_texture_repeat", PropertyInfo(Variant::INT, "rendering/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"));
}
+#ifdef TOOLS_ENABLED
+ if (editor) {
+ bool editor_embed_subwindows = EditorSettings::get_singleton()->get_setting("interface/editor/single_window_mode");
+
+ if (editor_embed_subwindows) {
+ sml->get_root()->set_embed_subwindows_hint(true);
+ }
+ }
+#endif
+
String local_game_path;
if (game_path != "" && !project_manager) {
local_game_path = game_path.replace("\\", "/");
@@ -1991,12 +2001,6 @@ bool Main::start() {
#ifdef TOOLS_ENABLED
if (editor) {
- bool editor_embed_subwindows = EditorSettings::get_singleton()->get_setting("interface/editor/single_window_mode");
-
- if (editor_embed_subwindows) {
- sml->get_root()->set_embed_subwindows_hint(true);
- }
-
if (game_path != GLOBAL_GET("application/run/main_scene") || !editor_node->has_scenes_in_session()) {
Error serr = editor_node->load_scene(local_game_path);
if (serr != OK) {