From dd639cbe8d81d86de5d1dfe80d9221701e1748d3 Mon Sep 17 00:00:00 2001 From: Uwe Date: Mon, 6 Dec 2021 02:40:34 +0100 Subject: [PATCH] [PD] fix division by zero in Helix - when a helix is defined in the growth mode it can have a pitch of zero This commit fixes the resulting division by zero by directly setting the known turns --- src/Mod/PartDesign/Gui/TaskHelixParameters.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp b/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp index 58d4fc45c4..f6af96849b 100644 --- a/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp @@ -475,7 +475,7 @@ void TaskHelixParameters::onModeChanged(int index) ui->pitch->setValue(propPitch->getValue()); ui->height->setValue(propHeight->getValue()); - ui->turns->setValue((propHeight->getValue()) / (propPitch->getValue())); + ui->turns->setValue(propTurns->getValue()); recomputeFeature(); updateUI();