Set RoundedArcball as default orbit style.

Reorder status bar entries.
This commit is contained in:
Max Wilfinger
2025-05-02 15:14:18 +02:00
committed by Chris Hennes
parent e4b301a048
commit 3fcadd01f5
7 changed files with 19 additions and 18 deletions

View File

@@ -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);
}

View File

@@ -105,7 +105,7 @@ public:
Trackball,
FreeTurntable,
TrackballClassic,
RoundedArcball,
RoundedArcball
};
enum class RotationCenterMode {

View File

@@ -25,12 +25,12 @@
<FCBool Name="ShowRotationCenter" Value="1"/>
<FCInt Name="NaviStepByTurn" Value="8"/>
<FCText Name="NavigationStyle">Gui::CADNavigationStyle</FCText>
<FCInt Name="OrbitStyle" Value="1"/>
<FCInt Name="OrbitStyle" Value="4"/>
<FCBool Name="Orthographic" Value="1"/>
<FCBool Name="Perspective" Value="0"/>
<FCFloat Name="PickRadius" Value="5.0"/>
<FCInt Name="RenderCache" Value="0"/>
<FCInt Name="RotationMode" Value="1"/>
<FCInt Name="RotationMode" Value="0"/>
<FCInt Name="SegmentsPerGeometry" Value="50"/>
<FCBool Name="ShowAxisCross" Value="0"/>
<FCBool Name="ShowFPS" Value="0"/>

View File

@@ -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);

View File

@@ -473,14 +473,15 @@ Select a set and then press the button to view said configurations.</string>
</property>
<property name="toolTip">
<string>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.</string>
</string>
</property>
<property name="currentIndex">
<number>1</number>
<number>4</number>
</property>
<item>
<property name="text">
@@ -534,7 +535,7 @@ Rounded Arcball: moving the mouse in the corners of the screen will only roll th
<string>Rotations in 3D will use current cursor position as center for rotation</string>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<item>
<property name="text">

View File

@@ -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));
}

View File

@@ -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)