mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
Fix display of command key
This commit is contained in:
@@ -168,8 +168,10 @@ wxDEFINE_EVENT(EVT_SYNC_CLOUD_PRESET, SimpleEvent);
|
|||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
static const wxString ctrl = ("Ctrl+");
|
static const wxString ctrl = ("Ctrl+");
|
||||||
|
static const std::string ctrl_t = "⌘";
|
||||||
#else
|
#else
|
||||||
static const wxString ctrl = _L("Ctrl+");
|
static const wxString ctrl = _L("Ctrl+");
|
||||||
|
static const wxString ctrl_t = ctrl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MainFrame::MainFrame() :
|
MainFrame::MainFrame() :
|
||||||
@@ -2502,7 +2504,7 @@ void MainFrame::init_menubar_as_editor()
|
|||||||
editMenu->AppendSeparator();
|
editMenu->AppendSeparator();
|
||||||
#else
|
#else
|
||||||
// BBS undo
|
// BBS undo
|
||||||
append_menu_item(editMenu, wxID_ANY, _L("Undo") + sep + ctrl + "Z",
|
append_menu_item(editMenu, wxID_ANY, _L("Undo") + sep + ctrl_t + "Z",
|
||||||
_L("Undo"), [this, handle_key_event](wxCommandEvent&) {
|
_L("Undo"), [this, handle_key_event](wxCommandEvent&) {
|
||||||
wxKeyEvent e;
|
wxKeyEvent e;
|
||||||
e.SetEventType(wxEVT_KEY_DOWN);
|
e.SetEventType(wxEVT_KEY_DOWN);
|
||||||
@@ -2514,7 +2516,7 @@ void MainFrame::init_menubar_as_editor()
|
|||||||
m_plater->undo(); },
|
m_plater->undo(); },
|
||||||
"", nullptr, [this](){return m_plater->can_undo(); }, this);
|
"", nullptr, [this](){return m_plater->can_undo(); }, this);
|
||||||
// BBS redo
|
// BBS redo
|
||||||
append_menu_item(editMenu, wxID_ANY, _L("Redo") + sep + ctrl + "Y",
|
append_menu_item(editMenu, wxID_ANY, _L("Redo") + sep + ctrl_t + "Y",
|
||||||
_L("Redo"), [this, handle_key_event](wxCommandEvent&) {
|
_L("Redo"), [this, handle_key_event](wxCommandEvent&) {
|
||||||
wxKeyEvent e;
|
wxKeyEvent e;
|
||||||
e.SetEventType(wxEVT_KEY_DOWN);
|
e.SetEventType(wxEVT_KEY_DOWN);
|
||||||
@@ -2527,7 +2529,7 @@ void MainFrame::init_menubar_as_editor()
|
|||||||
"", nullptr, [this](){return m_plater->can_redo(); }, this);
|
"", nullptr, [this](){return m_plater->can_redo(); }, this);
|
||||||
editMenu->AppendSeparator();
|
editMenu->AppendSeparator();
|
||||||
// BBS Cut TODO
|
// BBS Cut TODO
|
||||||
append_menu_item(editMenu, wxID_ANY, _L("Cut") + sep + ctrl + "X",
|
append_menu_item(editMenu, wxID_ANY, _L("Cut") + sep + ctrl_t + "X",
|
||||||
_L("Cut selection to clipboard"), [this, handle_key_event](wxCommandEvent&) {
|
_L("Cut selection to clipboard"), [this, handle_key_event](wxCommandEvent&) {
|
||||||
wxKeyEvent e;
|
wxKeyEvent e;
|
||||||
e.SetEventType(wxEVT_KEY_DOWN);
|
e.SetEventType(wxEVT_KEY_DOWN);
|
||||||
@@ -2539,7 +2541,7 @@ void MainFrame::init_menubar_as_editor()
|
|||||||
m_plater->cut_selection_to_clipboard(); },
|
m_plater->cut_selection_to_clipboard(); },
|
||||||
"", nullptr, [this]() {return m_plater->can_copy_to_clipboard(); }, this);
|
"", nullptr, [this]() {return m_plater->can_copy_to_clipboard(); }, this);
|
||||||
// BBS Copy
|
// BBS Copy
|
||||||
append_menu_item(editMenu, wxID_ANY, _L("Copy") + sep + ctrl + "C",
|
append_menu_item(editMenu, wxID_ANY, _L("Copy") + sep + ctrl_t + "C",
|
||||||
_L("Copy selection to clipboard"), [this, handle_key_event](wxCommandEvent&) {
|
_L("Copy selection to clipboard"), [this, handle_key_event](wxCommandEvent&) {
|
||||||
wxKeyEvent e;
|
wxKeyEvent e;
|
||||||
e.SetEventType(wxEVT_KEY_DOWN);
|
e.SetEventType(wxEVT_KEY_DOWN);
|
||||||
@@ -2551,7 +2553,7 @@ void MainFrame::init_menubar_as_editor()
|
|||||||
m_plater->copy_selection_to_clipboard(); },
|
m_plater->copy_selection_to_clipboard(); },
|
||||||
"", nullptr, [this](){return m_plater->can_copy_to_clipboard(); }, this);
|
"", nullptr, [this](){return m_plater->can_copy_to_clipboard(); }, this);
|
||||||
// BBS Paste
|
// BBS Paste
|
||||||
append_menu_item(editMenu, wxID_ANY, _L("Paste") + sep + ctrl + "V",
|
append_menu_item(editMenu, wxID_ANY, _L("Paste") + sep + ctrl_t + "V",
|
||||||
_L("Paste clipboard"), [this, handle_key_event](wxCommandEvent&) {
|
_L("Paste clipboard"), [this, handle_key_event](wxCommandEvent&) {
|
||||||
wxKeyEvent e;
|
wxKeyEvent e;
|
||||||
e.SetEventType(wxEVT_KEY_DOWN);
|
e.SetEventType(wxEVT_KEY_DOWN);
|
||||||
@@ -2607,7 +2609,7 @@ void MainFrame::init_menubar_as_editor()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// BBS Select All
|
// BBS Select All
|
||||||
append_menu_item(editMenu, wxID_ANY, _L("Select all") + sep + ctrl + "A",
|
append_menu_item(editMenu, wxID_ANY, _L("Select all") + sep + ctrl_t + "A",
|
||||||
_L("Selects all objects"), [this, handle_key_event](wxCommandEvent&) {
|
_L("Selects all objects"), [this, handle_key_event](wxCommandEvent&) {
|
||||||
wxKeyEvent e;
|
wxKeyEvent e;
|
||||||
e.SetEventType(wxEVT_KEY_DOWN);
|
e.SetEventType(wxEVT_KEY_DOWN);
|
||||||
|
|||||||
Reference in New Issue
Block a user