diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-02-08 12:16:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-08 12:16:01 +0100 |
commit | da18307a5327475a8a4142a06b7ba3db145d6c5c (patch) | |
tree | e5341047f3c0e469e8798b88ea7976fec0281344 | |
parent | 39bc758bb5381034a56709c188e27ed815114f3b (diff) | |
parent | 56f4d59962308db88a1929bf53c401190f4b9ced (diff) |
Merge pull request #25562 from IronicallySerious/fix-empty-project
Fix prompt for empty project files when loaded
-rw-r--r-- | editor/project_manager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 7ce4029476..e31851b3f1 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1526,6 +1526,13 @@ void ProjectManager::_open_selected_projects_ask() { } int config_version = (int)cf->get_value("", "config_version", 0); + + // Check if the config_version property was empty or 0 + if (config_version == 0) { + ask_update_settings->set_text(vformat(TTR("The following project settings file does not specify the version of Godot through which it was created.\n\n%s\n\nIf you proceed with opening it, it will be converted to Godot's current configuration file format.\nWarning: You will not be able to open the project with previous versions of the engine anymore."), conf)); + ask_update_settings->popup_centered_minsize(); + return; + } // Check if we need to convert project settings from an earlier engine version if (config_version < ProjectSettings::CONFIG_VERSION) { ask_update_settings->set_text(vformat(TTR("The following project settings file was generated by an older engine version, and needs to be converted for this version:\n\n%s\n\nDo you want to convert it?\nWarning: You will not be able to open the project with previous versions of the engine anymore."), conf)); |