Merge pull request #76658 from Paulb23/convert-indent-code-edit

Move convert_indent into CodeEdit
This commit is contained in:
Rémi Verschelde 2023-05-08 12:20:37 +02:00
commit eb6d6ab29f
No known key found for this signature in database
GPG key ID: C3336907360768E1
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();