Pref: Move pick radius to selection.

This commit is contained in:
Paddle
2023-04-12 14:44:31 +02:00
parent 64de24c039
commit 4439dffad1
4 changed files with 64 additions and 57 deletions

View File

@@ -343,57 +343,14 @@ but slower response to any scene changes.</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="spinPickRadiusLabel">
<property name="text">
<string>Pick radius (px):</string>
</property>
</widget>
</item>
<item row="4" column="4">
<widget class="Gui::PrefDoubleSpinBox" name="spinPickRadius">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Area for picking elements in 3D view.
Larger value eases to pick things, but can make small features impossible to select.
</string>
</property>
<property name="inputMethodHints">
<set>Qt::ImhPreferNumbers</set>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>0.500000000000000</double>
</property>
<property name="maximum">
<double>200.000000000000000</double>
</property>
<property name="value">
<double>5.000000000000000</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>PickRadius</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>View</cstring>
</property>
</widget>
</item>
<item row="5" column="0">
<item row="4" column="0">
<widget class="QLabel" name="textLabel1">
<property name="text">
<string>Eye to eye distance for stereo modes</string>
</property>
</widget>
</item>
<item row="5" column="4">
<item row="4" column="4">
<widget class="Gui::PrefDoubleSpinBox" name="FloatSpinBox_EyeDistance">
<property name="minimumSize">
<size>
@@ -429,7 +386,7 @@ bounding box size of the 3D object that is currently displayed.</string>
</property>
</widget>
</item>
<item row="6" column="0">
<item row="5" column="0">
<widget class="Gui::PrefCheckBox" name="checkBoxBacklight">
<property name="toolTip">
<string>Backlight is enabled with the defined color</string>
@@ -445,7 +402,7 @@ bounding box size of the 3D object that is currently displayed.</string>
</property>
</widget>
</item>
<item row="6" column="1">
<item row="5" column="1">
<widget class="Gui::PrefColorButton" name="backlightColor">
<property name="enabled">
<bool>false</bool>
@@ -468,7 +425,7 @@ bounding box size of the 3D object that is currently displayed.</string>
</property>
</widget>
</item>
<item row="6" column="2">
<item row="5" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -481,7 +438,7 @@ bounding box size of the 3D object that is currently displayed.</string>
</property>
</spacer>
</item>
<item row="6" column="3">
<item row="5" column="3">
<widget class="QLabel" name="backlightLabel">
<property name="enabled">
<bool>false</bool>
@@ -497,7 +454,7 @@ bounding box size of the 3D object that is currently displayed.</string>
</property>
</widget>
</item>
<item row="6" column="4">
<item row="5" column="4">
<widget class="Gui::PrefSlider" name="sliderIntensity">
<property name="enabled">
<bool>false</bool>

View File

@@ -83,7 +83,6 @@ void DlgSettings3DViewImp::saveSettings()
ui->SpinBox_CornerCoordSystemSize->onSave();
ui->CheckBox_ShowAxisCross->onSave();
ui->CheckBox_ShowFPS->onSave();
ui->spinPickRadius->onSave();
ui->CheckBox_use_SW_OpenGL->onSave();
ui->CheckBox_useVBO->onSave();
ui->FloatSpinBox_EyeDistance->onSave();
@@ -100,7 +99,6 @@ void DlgSettings3DViewImp::loadSettings()
ui->SpinBox_CornerCoordSystemSize->onRestore();
ui->CheckBox_ShowAxisCross->onRestore();
ui->CheckBox_ShowFPS->onRestore();
ui->spinPickRadius->onRestore();
ui->CheckBox_use_SW_OpenGL->onRestore();
ui->CheckBox_useVBO->onRestore();
ui->FloatSpinBox_EyeDistance->onRestore();

View File

@@ -45,6 +45,7 @@ DlgSettingsSelection::~DlgSettingsSelection()
void DlgSettingsSelection::saveSettings()
{
ui->spinPickRadius->onSave();
auto handle = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/TreeView");
handle->SetBool("SyncView", ui->checkBoxAutoSwitch->isChecked());
handle->SetBool("SyncSelection", ui->checkBoxAutoExpand->isChecked());
@@ -55,6 +56,7 @@ void DlgSettingsSelection::saveSettings()
void DlgSettingsSelection::loadSettings()
{
ui->spinPickRadius->onRestore();
auto handle = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/TreeView");
ui->checkBoxAutoSwitch->setChecked(handle->GetBool("SyncView", true));
ui->checkBoxAutoExpand->setChecked(handle->GetBool("SyncSelection", true));

View File

@@ -15,41 +15,84 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="spinPickRadiusLabel">
<property name="text">
<string>Pick radius (px):</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Gui::PrefDoubleSpinBox" name="spinPickRadius">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Area for picking elements in 3D view.
Larger value eases to pick things, but can make small features impossible to select.
</string>
</property>
<property name="inputMethodHints">
<set>Qt::ImhPreferNumbers</set>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>0.500000000000000</double>
</property>
<property name="maximum">
<double>200.000000000000000</double>
</property>
<property name="value">
<double>5.000000000000000</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>PickRadius</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>View</cstring>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxAutoSwitch">
<property name="text">
<string>Auto switch to the 3D view containing the selected item</string>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxAutoExpand">
<property name="text">
<string>Auto expand tree item when the corresponding object is selected in 3D view</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxPreselect">
<property name="text">
<string>Preselect the object in 3D view when mouse over the tree item</string>
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxRecord">
<property name="text">
<string>Record selection in tree view in order to go back/forward using navigation button</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxSelectionCheckBoxes">
<property name="text">
<string>Add checkboxes for selection in document tree</string>
</property>
</widget>
</item>
<item row="5" column="0">
<item row="6" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -64,6 +107,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Gui::PrefDoubleSpinBox</class>
<extends>QDoubleSpinBox</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>