summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-08-13 11:08:08 +0200
committerGitHub <noreply@github.com>2021-08-13 11:08:08 +0200
commit39efccf3b8298e30aa67a726ffd8752b3dff4c66 (patch)
treee7d673679a5b23fe76598b1c42a7a72573196680
parent2a40a58182d399994b60928f19fb83119898677f (diff)
parentea2489ce937d95f7103332c717c96aeb60d83271 (diff)
Merge pull request #50767 from KoBeWi/no_head_no_save
Don't save project on startup in no window mode
-rw-r--r--editor/editor_node.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 30edbd1e87..74ee9099f2 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -613,8 +613,10 @@ void EditorNode::_notification(int p_what) {
_editor_select(EDITOR_3D);
}
- // Save the project after opening to mark it as last modified.
- ProjectSettings::get_singleton()->save();
+ // Save the project after opening to mark it as last modified, except in headless mode.
+ if (DisplayServer::get_singleton()->window_can_draw()) {
+ ProjectSettings::get_singleton()->save();
+ }
/* DO NOT LOAD SCENES HERE, WAIT FOR FILE SCANNING AND REIMPORT TO COMPLETE */
} break;