diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-04-24 12:01:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 12:01:29 +0200 |
commit | 8c4b7fcbb6affaa5152f57dc0ee1b502ac0243c2 (patch) | |
tree | 26cc128fa986d79e2008c365c3e420a403b5d602 /editor/plugins/script_editor_plugin.cpp | |
parent | 16f532a2023c99f61aa13a5861d5dba5eebaa91f (diff) | |
parent | 165b7bab63345347dd3e72f99afc0e97881ebbbb (diff) | |
download | redot-engine-8c4b7fcbb6affaa5152f57dc0ee1b502ac0243c2.tar.gz |
Merge pull request #8500 from Paulb23/space_indent_fixes
Space indent fixes
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index a99cd7a2d6..cdcc0a0855 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<Script> script = se->get_edited_script(); if (script.is_valid()) se->apply_code(); |