Merge pull request #50767 from KoBeWi/no_head_no_save

Don't save project on startup in no window mode
This commit is contained in:
Rémi Verschelde 2021-08-13 11:08:08 +02:00 committed by GitHub
commit 39efccf3b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -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;