From 49714b09635fddb3dbada703017482e732a4b459 Mon Sep 17 00:00:00 2001 From: Eric M Date: Mon, 7 Dec 2020 21:32:00 +1000 Subject: Removed hardcoded shortcuts from /scene and converted to input actions This removes hardcoded actions from things like LineEdit and TextEdit. Previously, things like copy, paste, etc were all hardcoded to Ctrl+C, Ctrl+V, etc. They could not be changed. This allows the possibility of them being changed, by making them use the action map. This has the added benefit of greatly simplifying the input handling logic in those controls. The logic which was previously in a huge and hard to follow switch statement has been extracted to individual methods. --- editor/plugins/script_text_editor.cpp | 38 +++++++++++++-------------------- editor/plugins/shader_editor_plugin.cpp | 30 +++++++++++++------------- editor/plugins/text_editor.cpp | 28 ++++++++++++------------ 3 files changed, 44 insertions(+), 52 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 71b18497b0..b6df66b8af 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1066,7 +1066,7 @@ void ScriptTextEditor::_edit_option(int p_op) { return; } - tx->indent_left(); + tx->indent_selected_lines_left(); } break; case EDIT_INDENT_RIGHT: { Ref