From 165b7bab63345347dd3e72f99afc0e97881ebbbb Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sun, 23 Apr 2017 19:19:30 +0100 Subject: [PATCH] Fixed convert indent and trim whitespace on save --- editor/plugins/script_editor_plugin.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index a99cd7a2d68..cdcc0a08550 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1534,13 +1534,6 @@ void ScriptEditor::save_all_scripts() { if (!se) continue; - if (!se->is_unsaved()) - continue; - - if (trim_trailing_whitespace_on_save) { - se->trim_trailing_whitespace(); - } - if (convert_indent_on_save) { if (use_space_indentation) { se->convert_indent_to_spaces(); @@ -1549,6 +1542,13 @@ void ScriptEditor::save_all_scripts() { } } + if (trim_trailing_whitespace_on_save) { + se->trim_trailing_whitespace(); + } + + if (!se->is_unsaved()) + continue; + Ref