From 4f5922f193d5ad944e8cf00f6dd8ae44d4bcf88e Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Wed, 5 Jun 2024 19:54:27 +0800 Subject: [PATCH] FIX:fix bug of shortcut key jira: STUDIO-7252 Change-Id: I9e83c4055250aa78701baa5626006f14390f4fc5 (cherry picked from commit f20788cd2c2eded210ad008601915630c998427b) --- src/slic3r/GUI/GUI.cpp | 4 ++-- src/slic3r/GUI/MainFrame.cpp | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp index 8c85a88e6..a9dca1d57 100644 --- a/src/slic3r/GUI/GUI.cpp +++ b/src/slic3r/GUI/GUI.cpp @@ -82,7 +82,7 @@ const std::string& shortkey_ctrl_prefix() { static const std::string str = #ifdef __APPLE__ - "⌘+" + "command+" //"⌘+" #else _u8L("Ctrl+") #endif @@ -94,7 +94,7 @@ const std::string& shortkey_alt_prefix() { static const std::string str = #ifdef __APPLE__ - "⌥+" + "option+"//"⌥+" #else "Alt+" #endif diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 752bf6134..555e20f86 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -2172,10 +2172,15 @@ static const wxString sep_space = ""; static wxMenu* generate_help_menu() { wxMenu* helpMenu = new wxMenu(); - +#ifdef __WINDOWS__ // shortcut key - append_menu_item(helpMenu, wxID_ANY, _L("Keyboard Shortcuts") + sep + "&?", _L("Show the list of the keyboard shortcuts"), + auto alt = GUI::shortkey_alt_prefix(); + append_menu_item(helpMenu, wxID_ANY, _L("Keyboard Shortcuts") + sep + "& Shift+" + alt +"+?", _L("Show the list of the keyboard shortcuts"), [](wxCommandEvent&) { wxGetApp().keyboard_shortcuts(); }); +#else + append_menu_item(helpMenu, wxID_ANY, _L("Keyboard Shortcuts") + sep + "& Shift+?", _L("Show the list of the keyboard shortcuts"), + [](wxCommandEvent &) { wxGetApp().keyboard_shortcuts(); }); +#endif // Show Beginner's Tutorial append_menu_item(helpMenu, wxID_ANY, _L("Setup Wizard"), _L("Setup Wizard"), [](wxCommandEvent &) {wxGetApp().ShowUserGuide();});