From 264d0bb890926ab4f13457d9ea140d07f2694465 Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Tue, 18 Oct 2022 23:28:06 +0200 Subject: [PATCH] [Bugfix] PartDesign: Fix HoleCutDepth not being recalculated correctly HoleCutDepth is reset to 0 to force a recalculation of te depth when HoleCutType is set to a new value. But the line pcHole->HoleCutCustomValues.setValue(false) also forces a recalculation. So the depth was recalculated with the old value in HoleCutType which was not expected behaviour. --- src/Mod/PartDesign/Gui/TaskHoleParameters.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp b/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp index 8c2c9873e5..87aad26331 100644 --- a/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp @@ -342,6 +342,7 @@ void TaskHoleParameters::holeCutTypeChanged(int index) // the HoleCutDepth is something different for countersinks and counterbores // therefore reset it, it will be reset to sensible values by setting the new HoleCutType pcHole->HoleCutDepth.setValue(0.0); + pcHole->HoleCutType.setValue(index); // when holeCutType was changed, reset HoleCutCustomValues to false because it should // be a purpose decision to overwrite the normed values @@ -349,8 +350,6 @@ void TaskHoleParameters::holeCutTypeChanged(int index) ui->HoleCutCustomValues->setChecked(false); pcHole->HoleCutCustomValues.setValue(false); - pcHole->HoleCutType.setValue(index); - // recompute to get the info about the HoleCutType properties recomputeFeature();