diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-01-09 09:37:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-09 09:37:55 +0100 |
commit | be13360f567ad035d81813a81aa56e3ba9a3bff2 (patch) | |
tree | 1cde2d8887423d6265b7ebb534bda58ddbc54d67 /tools | |
parent | ad759de3c1b21a7f207917310699488a72118dea (diff) | |
parent | 91ea719c6e3af98c144b58f13f571a6ee2f10f91 (diff) |
Merge pull request #7458 from bojidar-bg/right-click-menu
Fix #7455 - script text editor's right click menu being weird
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/plugins/script_text_editor.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/editor/plugins/script_text_editor.cpp b/tools/editor/plugins/script_text_editor.cpp index c634e5c694..ba628b0985 100644 --- a/tools/editor/plugins/script_text_editor.cpp +++ b/tools/editor/plugins/script_text_editor.cpp @@ -1226,20 +1226,21 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color) { context_menu->clear(); if (p_selection) { - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut")); - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy")); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"), EDIT_COPY); } - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste")); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"), EDIT_PASTE); context_menu->add_separator(); - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all")); - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo")); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO); if (p_selection) { context_menu->add_separator(); - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left")); - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right")); - context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment")); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT); } if (p_color) { context_menu->add_separator(); |