Add 3Dconnexion Settings to the View Menu (#16345)

* Add 3Dconnexion Settings to the View Menu

The 3Dconnexion settings overlay could only be opened with its keyboard
shortcut. On macOS that is Cmd+Shift+M, because plain Cmd+M is the
system Minimize shortcut, so users who pressed Cmd+M minimized the
window and never found the dialog (#5484).

Add a "3Dconnexion settings" check item to the View menu. It toggles the
overlay and shows the shortcut bound to it, and its label follows the
key if the user rebinds it. It is enabled only on Prepare and Preview
when a device is connected (on Windows, also only with the legacy
3Dconnexion option enabled).

Move that availability test into
Mouse3DController::can_show_settings_dialog() so the menu item and the
canvas shortcut share it.

* Rename and move the 3Dconnexion Settings menu item

Label it "Show 3Dconnexion Settings" to match the other View menu items,
and move it below "Reset Window Layout" in its own separated group since
it opens a settings window.

---------

Co-authored-by: yw4z <ywsyildiz@gmail.com>
This commit is contained in:
Erkan Ozgur Yilmazandyw4z authored and GitHub committed 2026-10-24 22:53:05 +03:00
1 parent 9f85357ade
commit 00444ae4d7
4 files changed
+26 -6

No files matched your search

+12
View File
@@ -3473,6 +3473,18 @@ void MainFrame::init_menubar_as_editor()
},
this);
viewMenu->AppendSeparator();
wxMenuItem* mouse3d_settings = append_menu_check_item(viewMenu, wxID_ANY, shortcut_label(_L("Show 3Dconnexion Settings"), Shortcut::Mouse3DSettings, true),
_L("Show/Hide 3Dconnexion devices settings dialog"),
[this](wxCommandEvent&) {
Mouse3DController& controller = m_plater->get_mouse3d_controller();
controller.show_settings_dialog(!controller.is_settings_dialog_shown());
m_plater->get_current_canvas3D()->post_event(SimpleEvent(wxEVT_PAINT));
},
this, [this]() { return is_prepare_or_preview_tab() && m_plater->get_mouse3d_controller().can_show_settings_dialog(); },
[this]() { return m_plater->get_mouse3d_controller().is_settings_dialog_shown(); }, this);
m_shortcut_menu_items.push_back({ mouse3d_settings, Shortcut::Mouse3DSettings, _L("Show 3Dconnexion Settings"), true });
viewMenu->AppendSeparator();
wxMenuItem* show_labels = append_menu_check_item(viewMenu, wxID_ANY, shortcut_label(_L("Show &Labels"), Shortcut::ShowLabels, true), _L("Show object labels in 3D scene."),
[this](wxCommandEvent&) { m_plater->show_view3D_labels(!m_plater->are_view3D_labels_shown()); m_plater->get_current_canvas3D()->post_event(SimpleEvent(wxEVT_PAINT)); }, this,