ENH: 3d mouse shortcut change to ctrl+m

jira: STUDIO-7448
Change-Id: Ie444d9d84ef644694ab63a16722c9810bc1560fb
(cherry picked from commit 5edced9d4b371f2a7f8c8f511845fc9084db0f87)
This commit is contained in:
zhou.xu 2024-06-24 15:05:54 +08:00 committed by Lane.Wei
parent 0d393d64b8
commit 18a0a7e6e7
3 changed files with 38 additions and 35 deletions

View File

@ -3105,24 +3105,26 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
break;
#ifdef __APPLE__
case 'm':
case 'M': {
wxGetApp().mainframe->Iconize();
break;
}
#endif /* __APPLE__ */
#ifdef __APPLE__
case 'b':
case 'B':
case 'M':
#else /* __APPLE__ */
case WXK_CONTROL_B:
case WXK_CONTROL_M:
#endif /* __APPLE__ */
{
#ifdef _WIN32
if (wxGetApp().app_config->get("use_legacy_3DConnexion") == "true") {
#endif //_WIN32
#ifdef __APPLE__
// On OSX use Cmd+Shift+M to "Show/Hide 3Dconnexion devices settings dialog"
if ((evt.GetModifiers() & shiftMask) != 0) {
#endif // __APPLE__
Mouse3DController &controller = wxGetApp().plater()->get_mouse3d_controller();
controller.show_settings_dialog(!controller.is_settings_dialog_shown());
m_dirty = true;
#ifdef __APPLE__
} else
// and Cmd+M to minimize application
wxGetApp().mainframe->Iconize();
#endif // __APPLE__
#ifdef _WIN32
}
#endif //_WIN32

View File

@ -196,10 +196,11 @@ void KBShortcutsDialog::fill_shortcuts()
{ ctrl + "P", L("Preferences") },
#endif
//3Dconnexion control
{ ctrl + "B", L("Show/Hide 3Dconnexion devices settings dialog") },
#ifndef __APPLE__
{ctrl + "Shift+M", L("Show/Hide 3Dconnexion devices settings dialog")},
#else
{ctrl + "M", L("Show/Hide 3Dconnexion devices settings dialog")},
#endif
// Switch table page
#ifndef __APPLE__
{ ctrl + "Tab", L("Switch tab page")},

View File

@ -2666,7 +2666,7 @@ void MainFrame::init_menubar_as_editor()
this, [this]() { return m_plater->is_view3D_shown(); }, [this]() { return m_plater->is_view3D_overhang_shown(); }, this);
viewMenu->AppendSeparator();
append_menu_item(
viewMenu, wxID_ANY, _L("Set 3DConnexion") + "\t" + ctrl + "B", _L("Set 3DConnexion mouse"),
viewMenu, wxID_ANY, _L("Set 3DConnexion"), _L("Set 3DConnexion mouse"),
[this](wxCommandEvent &) {
#ifdef _WIN32
if (wxGetApp().app_config->get("use_legacy_3DConnexion") == "true") {