FIX: mac command key been translated and cannot work

Change-Id: Ib8f83e7c0acee36ebf2f7365f544eeb804b4db8a
This commit is contained in:
liz.li 2023-04-26 19:27:03 +08:00 committed by lane.wei
parent fe04156500
commit 955d9bb84b

View file

@ -158,6 +158,12 @@ static wxIcon main_frame_icon(GUI_App::EAppMode app_mode)
wxDEFINE_EVENT(EVT_SYNC_CLOUD_PRESET, SimpleEvent);
#ifdef __APPLE__
static const wxString ctrl = ("Ctrl+");
#else
static const wxString ctrl = _L("Ctrl+");
#endif
MainFrame::MainFrame() :
DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_STYLE, "mainframe")
, m_printhost_queue_dlg(new PrintHostQueueDialog(this))
@ -1974,7 +1980,6 @@ static void add_common_publish_menu_items(wxMenu* publish_menu, MainFrame* mainF
static void add_common_view_menu_items(wxMenu* view_menu, MainFrame* mainFrame, std::function<bool(void)> can_change_view)
{
const wxString ctrl = _L("Ctrl+");
// The camera control accelerators are captured by GLCanvas3D::on_char().
append_menu_item(view_menu, wxID_ANY, _L("Default View") + "\t" + ctrl + "0", _L("Default View"), [mainFrame](wxCommandEvent&) {
mainFrame->select_view("plate");
@ -2004,8 +2009,6 @@ void MainFrame::init_menubar_as_editor()
wxMenuBar::SetAutoWindowMenu(false);
m_menubar = new wxMenuBar();
#endif
const wxString ctrl = _L("Ctrl+");
// File menu
wxMenu* fileMenu = new wxMenu;