Skip to content

Commit

Permalink
PD: [skip ci] in the helix task dialog use the value range defined in…
Browse files Browse the repository at this point in the history
… the helix feature
  • Loading branch information
wwmayer committed Mar 3, 2021
1 parent f982112 commit ac23438
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mod/PartDesign/App/FeatureHelix.cpp
Expand Up @@ -73,7 +73,7 @@ PROPERTY_SOURCE(PartDesign::Helix, PartDesign::ProfileBased)

// we purposely use not FLT_MAX because this would not be computable
const App::PropertyFloatConstraint::Constraints floatTurns = { Precision::Confusion(), INT_MAX, 1.0 };
const App::PropertyAngle::Constraints floatAngle = { -89.0, 89.0, 1.0 };
const App::PropertyAngle::Constraints floatAngle = { -89.0, 89.0, 5.0 };

This comment has been minimized.

Copy link
@donovaly

donovaly Mar 3, 2021

Member

Why is the step size now 5? This is too large for the helix angle, the previous step of 1 was already convenient

This comment has been minimized.

Copy link
@wwmayer

wwmayer Mar 3, 2021

Author Contributor

Because this is used in the dialog: https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/PartDesign/Gui/TaskHelixParameters.ui#L228
So, I changed it for the sake of consistency.

This comment has been minimized.

Copy link
@donovaly

donovaly Mar 3, 2021

Member

Thanks, then I will make a PR for the dialog and invite David


Helix::Helix()
{
Expand Down
3 changes: 3 additions & 0 deletions src/Mod/PartDesign/Gui/TaskHelixParameters.cpp
Expand Up @@ -135,6 +135,9 @@ TaskHelixParameters::TaskHelixParameters(PartDesignGui::ViewProviderHelix *Helix
ui->height->setValue(height);
ui->turns->setValue(turns);
ui->coneAngle->setValue(angle);
ui->coneAngle->setMinimum(propAngle->getMinimum());
ui->coneAngle->setMaximum(propAngle->getMaximum());
ui->coneAngle->setSingleStep(propAngle->getStepSize());
ui->checkBoxLeftHanded->setChecked(leftHanded);
ui->checkBoxReversed->setChecked(reversed);
ui->inputMode->setCurrentIndex(index);
Expand Down

0 comments on commit ac23438

Please sign in to comment.