Script editor: Rename 'Clone Down' to 'Duplicate Selection'
Fixes #36670.
(cherry picked from commit d41f4aca77
)
This commit is contained in:
parent
f0e76377cb
commit
b35e61ba85
8 changed files with 18 additions and 18 deletions
|
@ -712,8 +712,8 @@ void CodeTextEditor::_input(const Ref<InputEvent> &event) {
|
||||||
accept_event();
|
accept_event();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ED_IS_SHORTCUT("script_text_editor/clone_down", key_event)) {
|
if (ED_IS_SHORTCUT("script_text_editor/duplicate_selection", key_event)) {
|
||||||
clone_lines_down();
|
duplicate_selection();
|
||||||
accept_event();
|
accept_event();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1249,7 +1249,7 @@ void CodeTextEditor::delete_lines() {
|
||||||
text_editor->end_complex_operation();
|
text_editor->end_complex_operation();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeTextEditor::clone_lines_down() {
|
void CodeTextEditor::duplicate_selection() {
|
||||||
const int cursor_column = text_editor->cursor_get_column();
|
const int cursor_column = text_editor->cursor_get_column();
|
||||||
int from_line = text_editor->cursor_get_line();
|
int from_line = text_editor->cursor_get_line();
|
||||||
int to_line = text_editor->cursor_get_line();
|
int to_line = text_editor->cursor_get_line();
|
||||||
|
|
|
@ -217,7 +217,7 @@ public:
|
||||||
void move_lines_up();
|
void move_lines_up();
|
||||||
void move_lines_down();
|
void move_lines_down();
|
||||||
void delete_lines();
|
void delete_lines();
|
||||||
void clone_lines_down();
|
void duplicate_selection();
|
||||||
|
|
||||||
/// Toggle inline comment on currently selected lines, or on current line if nothing is selected,
|
/// Toggle inline comment on currently selected lines, or on current line if nothing is selected,
|
||||||
/// by adding or removing comment delimiter
|
/// by adding or removing comment delimiter
|
||||||
|
|
|
@ -1119,8 +1119,8 @@ void ScriptTextEditor::_edit_option(int p_op) {
|
||||||
case EDIT_DELETE_LINE: {
|
case EDIT_DELETE_LINE: {
|
||||||
code_editor->delete_lines();
|
code_editor->delete_lines();
|
||||||
} break;
|
} break;
|
||||||
case EDIT_CLONE_DOWN: {
|
case EDIT_DUPLICATE_SELECTION: {
|
||||||
code_editor->clone_lines_down();
|
code_editor->duplicate_selection();
|
||||||
} break;
|
} break;
|
||||||
case EDIT_TOGGLE_FOLD_LINE: {
|
case EDIT_TOGGLE_FOLD_LINE: {
|
||||||
tx->toggle_fold_line(tx->cursor_get_line());
|
tx->toggle_fold_line(tx->cursor_get_line());
|
||||||
|
@ -1802,7 +1802,7 @@ void ScriptTextEditor::_enable_code_editor() {
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
|
||||||
edit_menu->get_popup()->add_separator();
|
edit_menu->get_popup()->add_separator();
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/clone_down"), EDIT_CLONE_DOWN);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/duplicate_selection"), EDIT_DUPLICATE_SELECTION);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/complete_symbol"), EDIT_COMPLETE);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/complete_symbol"), EDIT_COMPLETE);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/evaluate_selection"), EDIT_EVALUATE);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/evaluate_selection"), EDIT_EVALUATE);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/trim_trailing_whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/trim_trailing_whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE);
|
||||||
|
@ -1969,10 +1969,10 @@ void ScriptTextEditor::register_editor() {
|
||||||
ED_SHORTCUT("script_text_editor/fold_all_lines", TTR("Fold All Lines"), 0);
|
ED_SHORTCUT("script_text_editor/fold_all_lines", TTR("Fold All Lines"), 0);
|
||||||
ED_SHORTCUT("script_text_editor/unfold_all_lines", TTR("Unfold All Lines"), 0);
|
ED_SHORTCUT("script_text_editor/unfold_all_lines", TTR("Unfold All Lines"), 0);
|
||||||
#ifdef OSX_ENABLED
|
#ifdef OSX_ENABLED
|
||||||
ED_SHORTCUT("script_text_editor/clone_down", TTR("Clone Down"), KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_C);
|
ED_SHORTCUT("script_text_editor/duplicate_selection", TTR("Duplicate Selection"), KEY_MASK_SHIFT | KEY_MASK_CMD | KEY_C);
|
||||||
ED_SHORTCUT("script_text_editor/complete_symbol", TTR("Complete Symbol"), KEY_MASK_CTRL | KEY_SPACE);
|
ED_SHORTCUT("script_text_editor/complete_symbol", TTR("Complete Symbol"), KEY_MASK_CTRL | KEY_SPACE);
|
||||||
#else
|
#else
|
||||||
ED_SHORTCUT("script_text_editor/clone_down", TTR("Clone Down"), KEY_MASK_CMD | KEY_D);
|
ED_SHORTCUT("script_text_editor/duplicate_selection", TTR("Duplicate Selection"), KEY_MASK_CMD | KEY_D);
|
||||||
ED_SHORTCUT("script_text_editor/complete_symbol", TTR("Complete Symbol"), KEY_MASK_CMD | KEY_SPACE);
|
ED_SHORTCUT("script_text_editor/complete_symbol", TTR("Complete Symbol"), KEY_MASK_CMD | KEY_SPACE);
|
||||||
#endif
|
#endif
|
||||||
ED_SHORTCUT("script_text_editor/evaluate_selection", TTR("Evaluate Selection"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_E);
|
ED_SHORTCUT("script_text_editor/evaluate_selection", TTR("Evaluate Selection"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_E);
|
||||||
|
|
|
@ -119,7 +119,7 @@ class ScriptTextEditor : public ScriptEditorBase {
|
||||||
EDIT_INDENT_RIGHT,
|
EDIT_INDENT_RIGHT,
|
||||||
EDIT_INDENT_LEFT,
|
EDIT_INDENT_LEFT,
|
||||||
EDIT_DELETE_LINE,
|
EDIT_DELETE_LINE,
|
||||||
EDIT_CLONE_DOWN,
|
EDIT_DUPLICATE_SELECTION,
|
||||||
EDIT_PICK_COLOR,
|
EDIT_PICK_COLOR,
|
||||||
EDIT_TO_UPPERCASE,
|
EDIT_TO_UPPERCASE,
|
||||||
EDIT_TO_LOWERCASE,
|
EDIT_TO_LOWERCASE,
|
||||||
|
|
|
@ -295,8 +295,8 @@ void ShaderEditor::_menu_option(int p_option) {
|
||||||
case EDIT_DELETE_LINE: {
|
case EDIT_DELETE_LINE: {
|
||||||
shader_editor->delete_lines();
|
shader_editor->delete_lines();
|
||||||
} break;
|
} break;
|
||||||
case EDIT_CLONE_DOWN: {
|
case EDIT_DUPLICATE_SELECTION: {
|
||||||
shader_editor->clone_lines_down();
|
shader_editor->duplicate_selection();
|
||||||
} break;
|
} break;
|
||||||
case EDIT_TOGGLE_COMMENT: {
|
case EDIT_TOGGLE_COMMENT: {
|
||||||
if (shader.is_null()) {
|
if (shader.is_null()) {
|
||||||
|
@ -627,7 +627,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/delete_line"), EDIT_DELETE_LINE);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/delete_line"), EDIT_DELETE_LINE);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/clone_down"), EDIT_CLONE_DOWN);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/duplicate_selection"), EDIT_DUPLICATE_SELECTION);
|
||||||
edit_menu->get_popup()->add_separator();
|
edit_menu->get_popup()->add_separator();
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/complete_symbol"), EDIT_COMPLETE);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/complete_symbol"), EDIT_COMPLETE);
|
||||||
edit_menu->get_popup()->connect("id_pressed", this, "_menu_option");
|
edit_menu->get_popup()->connect("id_pressed", this, "_menu_option");
|
||||||
|
|
|
@ -80,7 +80,7 @@ class ShaderEditor : public PanelContainer {
|
||||||
EDIT_INDENT_LEFT,
|
EDIT_INDENT_LEFT,
|
||||||
EDIT_INDENT_RIGHT,
|
EDIT_INDENT_RIGHT,
|
||||||
EDIT_DELETE_LINE,
|
EDIT_DELETE_LINE,
|
||||||
EDIT_CLONE_DOWN,
|
EDIT_DUPLICATE_SELECTION,
|
||||||
EDIT_TOGGLE_COMMENT,
|
EDIT_TOGGLE_COMMENT,
|
||||||
EDIT_COMPLETE,
|
EDIT_COMPLETE,
|
||||||
SEARCH_FIND,
|
SEARCH_FIND,
|
||||||
|
|
|
@ -398,8 +398,8 @@ void TextEditor::_edit_option(int p_op) {
|
||||||
case EDIT_DELETE_LINE: {
|
case EDIT_DELETE_LINE: {
|
||||||
code_editor->delete_lines();
|
code_editor->delete_lines();
|
||||||
} break;
|
} break;
|
||||||
case EDIT_CLONE_DOWN: {
|
case EDIT_DUPLICATE_SELECTION: {
|
||||||
code_editor->clone_lines_down();
|
code_editor->duplicate_selection();
|
||||||
} break;
|
} break;
|
||||||
case EDIT_TOGGLE_FOLD_LINE: {
|
case EDIT_TOGGLE_FOLD_LINE: {
|
||||||
tx->toggle_fold_line(tx->cursor_get_line());
|
tx->toggle_fold_line(tx->cursor_get_line());
|
||||||
|
@ -629,7 +629,7 @@ TextEditor::TextEditor() {
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
|
||||||
edit_menu->get_popup()->add_separator();
|
edit_menu->get_popup()->add_separator();
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/clone_down"), EDIT_CLONE_DOWN);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/duplicate_selection"), EDIT_DUPLICATE_SELECTION);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/trim_trailing_whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/trim_trailing_whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
|
||||||
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS);
|
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS);
|
||||||
|
|
|
@ -77,7 +77,7 @@ private:
|
||||||
EDIT_INDENT_RIGHT,
|
EDIT_INDENT_RIGHT,
|
||||||
EDIT_INDENT_LEFT,
|
EDIT_INDENT_LEFT,
|
||||||
EDIT_DELETE_LINE,
|
EDIT_DELETE_LINE,
|
||||||
EDIT_CLONE_DOWN,
|
EDIT_DUPLICATE_SELECTION,
|
||||||
EDIT_TO_UPPERCASE,
|
EDIT_TO_UPPERCASE,
|
||||||
EDIT_TO_LOWERCASE,
|
EDIT_TO_LOWERCASE,
|
||||||
EDIT_CAPITALIZE,
|
EDIT_CAPITALIZE,
|
||||||
|
|
Loading…
Reference in a new issue