From c0a517285f397a4b4dd3ab49ce4cc1d5ccd4db2a Mon Sep 17 00:00:00 2001 From: tetektoza Date: Sat, 2 Aug 2025 18:22:47 +0200 Subject: [PATCH] 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 Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com> --- src/Mod/Part/Gui/DlgSettingsGeneral.cpp | 2 + src/Mod/Part/Gui/DlgSettingsGeneral.ui | 73 ++++++++++++++++--------- 2 files changed, 50 insertions(+), 25 deletions(-) diff --git a/src/Mod/Part/Gui/DlgSettingsGeneral.cpp b/src/Mod/Part/Gui/DlgSettingsGeneral.cpp index 2f2b4a9504..6ab826e391 100644 --- a/src/Mod/Part/Gui/DlgSettingsGeneral.cpp +++ b/src/Mod/Part/Gui/DlgSettingsGeneral.cpp @@ -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(); } /** diff --git a/src/Mod/Part/Gui/DlgSettingsGeneral.ui b/src/Mod/Part/Gui/DlgSettingsGeneral.ui index e06db48c68..ee3a26255c 100644 --- a/src/Mod/Part/Gui/DlgSettingsGeneral.ui +++ b/src/Mod/Part/Gui/DlgSettingsGeneral.ui @@ -110,40 +110,63 @@ Features settings - + - - - Default profile type for holes - - + + + + + Default profile type for holes + + + + + + + 1 + + + defaultBaseTypeHole + + + Mod/PartDesign + + + + Circles and arcs + + + + + Points, circles and arcs + + + + + Points + + + + + - - - 1 + + + Switch to task panel when entering Part Design workbench + + + Automatically switch to the task panel when the Part Design workbench is activated + + + true - defaultBaseTypeHole + SwitchToTask Mod/PartDesign - - - Circles and arcs - - - - - Points, circles and arcs - - - - - Points - -