From 3fcadd01f5b8f122b07f425e5a1a173264c5c366 Mon Sep 17 00:00:00 2001 From: Max Wilfinger Date: Fri, 2 May 2025 15:14:18 +0200 Subject: [PATCH] Set RoundedArcball as default orbit style. Reorder status bar entries. --- src/Gui/Navigation/NavigationStyle.cpp | 4 ++-- src/Gui/Navigation/NavigationStyle.h | 2 +- src/Gui/PreferencePackTemplates/View.cfg | 4 ++-- src/Gui/PreferencePages/DlgSettingsNavigation.cpp | 4 ++-- src/Gui/PreferencePages/DlgSettingsNavigation.ui | 11 ++++++----- src/Gui/View3DSettings.cpp | 2 +- src/Mod/Tux/NavigationIndicatorGui.py | 10 +++++----- 7 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/Gui/Navigation/NavigationStyle.cpp b/src/Gui/Navigation/NavigationStyle.cpp index b24fce9ff0..d0c81e3a60 100644 --- a/src/Gui/Navigation/NavigationStyle.cpp +++ b/src/Gui/Navigation/NavigationStyle.cpp @@ -292,7 +292,7 @@ private: private: SbMatrix worldToScreen; - OrbitStyle orbit{Trackball}; + OrbitStyle orbit{RoundedArcball}; }; NavigationStyleEvent::NavigationStyleEvent(const Base::Type& s) @@ -385,7 +385,7 @@ void NavigationStyle::initialize() this->zoomStep = App::GetApplication().GetParameterGroupByPath ("User parameter:BaseApp/Preferences/View")->GetFloat("ZoomStep",0.2f); long mode = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/View")->GetInt("RotationMode", 1); + ("User parameter:BaseApp/Preferences/View")->GetInt("RotationMode", 0); if (mode == 0) { setRotationCenterMode(NavigationStyle::RotationCenterMode::WindowCenter); } diff --git a/src/Gui/Navigation/NavigationStyle.h b/src/Gui/Navigation/NavigationStyle.h index 74e698d482..b3000728ab 100644 --- a/src/Gui/Navigation/NavigationStyle.h +++ b/src/Gui/Navigation/NavigationStyle.h @@ -105,7 +105,7 @@ public: Trackball, FreeTurntable, TrackballClassic, - RoundedArcball, + RoundedArcball }; enum class RotationCenterMode { diff --git a/src/Gui/PreferencePackTemplates/View.cfg b/src/Gui/PreferencePackTemplates/View.cfg index 8c2392fb2c..5abee9232f 100644 --- a/src/Gui/PreferencePackTemplates/View.cfg +++ b/src/Gui/PreferencePackTemplates/View.cfg @@ -25,12 +25,12 @@ Gui::CADNavigationStyle - + - + diff --git a/src/Gui/PreferencePages/DlgSettingsNavigation.cpp b/src/Gui/PreferencePages/DlgSettingsNavigation.cpp index 6a56a33d8f..e1425348a4 100644 --- a/src/Gui/PreferencePages/DlgSettingsNavigation.cpp +++ b/src/Gui/PreferencePages/DlgSettingsNavigation.cpp @@ -162,11 +162,11 @@ void DlgSettingsNavigation::loadSettings() int index = ui->comboNavigationStyle->findData(QByteArray(model.c_str())); if (index > -1) ui->comboNavigationStyle->setCurrentIndex(index); - index = hGrp->GetInt("OrbitStyle", int(NavigationStyle::Trackball)); + index = hGrp->GetInt("OrbitStyle", int(NavigationStyle::RoundedArcball)); index = Base::clamp(index, 0, ui->comboOrbitStyle->count()-1); ui->comboOrbitStyle->setCurrentIndex(index); - index = hGrp->GetInt("RotationMode", 1); + index = hGrp->GetInt("RotationMode", 0); ui->comboRotationMode->setCurrentIndex(index); bool showNaviCube = hGrp->GetBool("ShowNaviCube", true); diff --git a/src/Gui/PreferencePages/DlgSettingsNavigation.ui b/src/Gui/PreferencePages/DlgSettingsNavigation.ui index b081328995..94f7983e97 100644 --- a/src/Gui/PreferencePages/DlgSettingsNavigation.ui +++ b/src/Gui/PreferencePages/DlgSettingsNavigation.ui @@ -473,14 +473,15 @@ Select a set and then press the button to view said configurations. Rotation orbit style. -Trackball: moving the mouse horizontally will rotate the part around the y-axis +Rounded Arcball: moving the mouse in the corners of the screen will only roll the part. +Trackball: moving the mouse horizontally will rotate the part around the y-axis. +Trackball Classic: moving the mouse will rotate the part allowing precession. Turntable: the part will be rotated around the z-axis (with constrained axes). Free Turntable: the part will be rotated around the z-axis. -Trackball Classic: moving the mouse will rotate the part allowing precession -Rounded Arcball: moving the mouse in the corners of the screen will only roll the part. + - 1 + 4 @@ -534,7 +535,7 @@ Rounded Arcball: moving the mouse in the corners of the screen will only roll th Rotations in 3D will use current cursor position as center for rotation - 1 + 0 diff --git a/src/Gui/View3DSettings.cpp b/src/Gui/View3DSettings.cpp index 9bd0669627..57c67331a8 100644 --- a/src/Gui/View3DSettings.cpp +++ b/src/Gui/View3DSettings.cpp @@ -320,7 +320,7 @@ void View3DSettings::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M } } else if (strcmp(Reason,"OrbitStyle") == 0) { - int style = rGrp.GetInt("OrbitStyle",1); + int style = rGrp.GetInt("OrbitStyle",4); for (auto _viewer : _viewers) { _viewer->navigationStyle()->setOrbitStyle(NavigationStyle::OrbitStyle(style)); } diff --git a/src/Mod/Tux/NavigationIndicatorGui.py b/src/Mod/Tux/NavigationIndicatorGui.py index a5fde4439f..84b7f3db7b 100644 --- a/src/Mod/Tux/NavigationIndicatorGui.py +++ b/src/Mod/Tux/NavigationIndicatorGui.py @@ -657,11 +657,11 @@ aRoundedArcball = QtGui.QAction(gOrbit) aRoundedArcball.setObjectName("NavigationIndicator_RoundedArcball") aRoundedArcball.setCheckable(True) -menuOrbit.addAction(aTurntable) -menuOrbit.addAction(aTrackball) -menuOrbit.addAction(aFreeTurntable) -menuOrbit.addAction(aTrackballClassic) menuOrbit.addAction(aRoundedArcball) +menuOrbit.addAction(aTrackball) +menuOrbit.addAction(aTrackballClassic) +menuOrbit.addAction(aTurntable) +menuOrbit.addAction(aFreeTurntable) menuSettings.addMenu(menuOrbit) menuSettings.addSeparator() @@ -814,7 +814,7 @@ def onOrbit(): def onOrbitShow(): """Set turntable or trackball orbit style.""" - OrbitStyle = pView.GetInt("OrbitStyle", 1) + OrbitStyle = pView.GetInt("OrbitStyle", 4) gOrbit.blockSignals(True) if OrbitStyle == 0: aTurntable.setChecked(True)