navigation: selectable mouse navigation style

Options → User Preferences → Navigation style picks which mouse
gestures pan and orbit the model view (#1480):

- CAD (default): middle button pans, Shift + middle button orbits.
- Blender: middle button orbits, Shift + middle button pans.
- CATIA: middle button pans; pressing the left button during it orbits,
  so 3D navigation needs only the mouse.

An armed orbit tool always orbits. The choice is saved with the user
settings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-15 11:17:13 +03:00
1 parent 74df9ff84a
commit 19ecf78bd9
30 files changed
+183 -1

No files matched your search

+8
View File
@@ -650,6 +650,11 @@ pub(super) struct OpenCADStudio {
polar_increment_deg: f32,
/// Reverse the mouse-wheel zoom direction when true (ZOOMWHEEL = 1).
zoom_wheel_reversed: bool,
/// Which mouse gestures pan and orbit the model view.
navigation_style: crate::app::settings::NavigationStyle,
/// CATIA navigation: the left button went down while the middle one was
/// held, so the middle drag orbits until it is released.
nav_left_with_middle: bool,
/// Scroll pans and Ctrl+scroll zooms (touchpads); see `scroll_intent`.
touchpad_pan: bool,
/// Multi-finger gestures on a touch screen.
@@ -2657,6 +2662,7 @@ pub enum Message {
CommandLineOpacityChanged(u8),
/// Toggle reversing the mouse-wheel zoom direction (ZOOMWHEEL).
ZoomWheelReversedChanged(bool),
NavigationStyleChanged(crate::app::settings::NavigationStyle),
TouchpadPanChanged(bool),
/// Options: show the pull-down menus (MENUBAR).
MenuBarChanged(bool),
@@ -4632,6 +4638,8 @@ impl OpenCADStudio {
polar_mode: false,
polar_increment_deg: 45.0,
zoom_wheel_reversed: false,
navigation_style: Default::default(),
nav_left_with_middle: false,
touchpad_pan: false,
touch: Default::default(),
touch_offset: None,