From 35523a46c0d948ff3c578de6808a08233b0e81c9 Mon Sep 17 00:00:00 2001 From: Daniel Ting Date: Tue, 30 Jun 2020 21:39:12 -0500 Subject: [PATCH] Make "Close and save changes?" actually save This fixes issue #39844, where the confirmation dialog when a user attempts to close an unsaved script did not actually save it even after clicking "Save." (cherry picked from commit d2a5b92e9be3e244ceb9a86b4ebf904e1db603fc) --- editor/plugins/script_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index a6f9cf0e6d1..53642a30893 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -583,7 +583,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { ScriptEditorBase *current = Object::cast_to(tab_container->get_child(selected)); if (current) { if (p_save) { - apply_scripts(); + _menu_option(FILE_SAVE); } Ref