Part: Enable SwitchToTask as a preference (#22136)

* Part: Enable SwitchToTask as a preference

As the title says. No clue why this variable was not available in
preferences, but giving it to users allow them to stop Part Design
workbench to switch to Tasks tab by default, everytime they switch
workbench, which users claim to be annoying.

So this patch adds this preference under Part/Part Design.

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
This commit is contained in:
tetektoza
2025-08-02 18:22:47 +02:00
committed by GitHub
parent 5aae85f48d
commit afa61ab0d1
2 changed files with 50 additions and 25 deletions

View File

@@ -63,6 +63,7 @@ void DlgSettingsGeneral::saveSettings()
ui->checkObjectNaming->onSave();
ui->checkAllowCompoundBody->onSave();
ui->comboDefaultProfileTypeForHole->onSave();
ui->checkSwitchToTask->onSave();
}
void DlgSettingsGeneral::loadSettings()
@@ -73,6 +74,7 @@ void DlgSettingsGeneral::loadSettings()
ui->checkObjectNaming->onRestore();
ui->checkAllowCompoundBody->onRestore();
ui->comboDefaultProfileTypeForHole->onRestore();
ui->checkSwitchToTask->onRestore();
}
/**

View File

@@ -110,40 +110,63 @@
<property name="title">
<string>Features settings</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Default profile type for holes</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Default profile type for holes</string>
</property>
</widget>
</item>
<item>
<widget class="Gui::PrefComboBox" name="comboDefaultProfileTypeForHole">
<property name="currentIndex">
<number>1</number>
</property>
<property name="prefEntry" stdset="0">
<cstring>defaultBaseTypeHole</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/PartDesign</cstring>
</property>
<item>
<property name="text">
<string>Circles and arcs</string>
</property>
</item>
<item>
<property name="text">
<string>Points, circles and arcs</string>
</property>
</item>
<item>
<property name="text">
<string>Points</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Gui::PrefComboBox" name="comboDefaultProfileTypeForHole">
<property name="currentIndex">
<number>1</number>
<widget class="Gui::PrefCheckBox" name="checkSwitchToTask" native="true">
<property name="text" stdset="0">
<string>Switch to task panel when entering Part Design workbench</string>
</property>
<property name="toolTip" stdset="0">
<string>Automatically switch to the task panel when the Part Design workbench is activated</string>
</property>
<property name="checked" stdset="0">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>defaultBaseTypeHole</cstring>
<cstring>SwitchToTask</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/PartDesign</cstring>
</property>
<item>
<property name="text">
<string>Circles and arcs</string>
</property>
</item>
<item>
<property name="text">
<string>Points, circles and arcs</string>
</property>
</item>
<item>
<property name="text">
<string>Points</string>
</property>
</item>
</widget>
</item>
</layout>