From d2a5b92e9be3e244ceb9a86b4ebf904e1db603fc 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." --- 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 fd415d40daee..72d287c35c6e 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -538,7 +538,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