Move convert_indent into CodeEdit

This commit is contained in:
Paulb23 2023-05-01 21:41:50 +01:00
parent 64eeb04d2c
commit 0b3fba45c6
12 changed files with 282 additions and 153 deletions

View file

@ -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();