aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/script_text_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r--editor/plugins/script_text_editor.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 62fcc4b48..1aa9f0448 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -355,7 +355,9 @@ void ScriptTextEditor::convert_indent_to_spaces() {
}
j++;
}
- tx->set_line(i, line);
+ if (changed_indentation) {
+ tx->set_line(i, line);
+ }
}
if (changed_indentation) {
tx->cursor_set_column(cursor_column);
@@ -409,7 +411,9 @@ void ScriptTextEditor::convert_indent_to_tabs() {
}
j++;
}
- tx->set_line(i, line);
+ if (changed_indentation) {
+ tx->set_line(i, line);
+ }
}
if (changed_indentation) {
tx->cursor_set_column(cursor_column);
@@ -520,6 +524,7 @@ void ScriptTextEditor::_validate_script() {
}
emit_signal("name_changed");
+ emit_signal("script_changed");
}
static Node *_find_node_for_script(Node *p_base, Node *p_current, const Ref<Script> &p_script) {