Fixed convert indent and trim whitespace on save
This commit is contained in:
parent
e7e1d65eb0
commit
165b7bab63
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user