Pārlūkot izejas kodu

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)
Daniel Ting 5 gadi atpakaļ
vecāks
revīzija
35523a46c0
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      editor/plugins/script_editor_plugin.cpp

+ 1 - 1
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<ScriptEditorBase>(tab_container->get_child(selected));
 	if (current) {
 		if (p_save) {
-			apply_scripts();
+			_menu_option(FILE_SAVE);
 		}
 
 		Ref<Script> script = current->get_edited_resource();