ENH: add shortcut key of clone

Change-Id: I63a570ac05695d6cd1e36293f7ca9858d9f7f358
This commit is contained in:
liz.li 2023-08-09 17:04:10 +08:00 committed by Lane.Wei
parent e88550b206
commit 0167baee89
2 changed files with 9 additions and 1 deletions

View File

@ -3105,6 +3105,9 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
#endif /* __APPLE__ */
post_event(SimpleEvent(EVT_GLTOOLBAR_DELETE_ALL));
break;
case WXK_CONTROL_Q:
post_event(SimpleEvent(EVT_GLTOOLBAR_CLONE));
break;
default: evt.Skip();
}
} else {

View File

@ -1452,7 +1452,12 @@ wxMenu* MenuFactory::assemble_part_menu()
void MenuFactory::append_menu_item_clone(wxMenu* menu)
{
append_menu_item(menu, wxID_ANY, _L("Clone") , "",
#ifdef __APPLE__
static const wxString ctrl = ("Ctrl+");
#else
static const wxString ctrl = _L("Ctrl+");
#endif
append_menu_item(menu, wxID_ANY, _L("Clone") + "\t" + ctrl + "Q", "",
[this](wxCommandEvent&) {
plater()->clone_selection();
}, "", nullptr,