diff options
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 65b7526722..f1ad728bc0 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -378,12 +378,8 @@ void ScriptTextEditor::insert_final_newline() { code_editor->insert_final_newline(); } -void ScriptTextEditor::convert_indent_to_spaces() { - code_editor->convert_indent_to_spaces(); -} - -void ScriptTextEditor::convert_indent_to_tabs() { - code_editor->convert_indent_to_tabs(); +void ScriptTextEditor::convert_indent() { + code_editor->get_text_editor()->convert_indent(); } void ScriptTextEditor::tag_saved_version() { @@ -1282,10 +1278,12 @@ void ScriptTextEditor::_edit_option(int p_op) { trim_trailing_whitespace(); } break; case EDIT_CONVERT_INDENT_TO_SPACES: { - convert_indent_to_spaces(); + tx->set_indent_using_spaces(true); + convert_indent(); } break; case EDIT_CONVERT_INDENT_TO_TABS: { - convert_indent_to_tabs(); + tx->set_indent_using_spaces(false); + convert_indent(); } break; case EDIT_PICK_COLOR: { color_panel->popup(); |