Skip to content

Commit

Permalink
Merge pull request #32321 from Calinou/editor-disable-quit-confirmation
Browse files Browse the repository at this point in the history
Remove the editor quit confirmation when there are no unsaved changes
  • Loading branch information
akien-mga authored Jan 18, 2021
2 parents 5496174 + 6826400 commit 688f4ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
12 changes: 2 additions & 10 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2598,15 +2598,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
if (!p_confirmed) {
bool save_each = EDITOR_GET("interface/editor/save_each_scene_on_quit");
if (_next_unsaved_scene(!save_each) == -1) {
bool confirm = EDITOR_GET("interface/editor/quit_confirmation");
if (confirm) {
confirmation->get_ok_button()->set_text(p_option == FILE_QUIT ? TTR("Quit") : TTR("Yes"));
confirmation->set_text(p_option == FILE_QUIT ? TTR("Exit the editor?") : TTR("Open Project Manager?"));
confirmation->popup_centered();
} else {
_discard_changes();
break;
}
_discard_changes();
break;
} else {
if (save_each) {
_menu_option_confirm(p_option == FILE_QUIT ? FILE_CLOSE_ALL_AND_QUIT : FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER, false);
Expand Down Expand Up @@ -5760,7 +5753,6 @@ EditorNode::EditorNode() {
EDITOR_DEF("run/output/always_close_output_on_stop", true);
EDITOR_DEF("run/auto_save/save_before_running", true);
EDITOR_DEF_RST("interface/editor/save_each_scene_on_quit", true);
EDITOR_DEF("interface/editor/quit_confirmation", true);
EDITOR_DEF("interface/editor/show_update_spinner", false);
EDITOR_DEF("interface/editor/update_continuously", false);
EDITOR_DEF_RST("interface/scene_tabs/restore_scenes_on_load", false);
Expand Down
1 change: 0 additions & 1 deletion editor/editor_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["interface/editor/single_window_mode"] = PropertyInfo(Variant::BOOL, "interface/editor/single_window_mode", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/hide_console_window", false);
_initial_set("interface/editor/save_each_scene_on_quit", true); // Regression
_initial_set("interface/editor/quit_confirmation", true);

// Theme
_initial_set("interface/theme/preset", "Default");
Expand Down

0 comments on commit 688f4ae

Please sign in to comment.