[PD] fix wording for skew prisms
the UI and the property is not consistent. In the dialog we use the term angle upon user feedback while the property still has the name "skew" in it. I simply forgot this change in my PR that implemented skew prisms. This is now corrected by this PR.
This commit is contained in:
@@ -192,10 +192,10 @@ TaskBoxPrimitives::TaskBoxPrimitives(ViewProviderPrimitive* vp, QWidget* parent)
|
||||
ui->prismCircumradius->bind(static_cast<PartDesign::Prism*>(vp->getObject())->Circumradius);
|
||||
ui->prismHeight->setValue(static_cast<PartDesign::Prism*>(vp->getObject())->Height.getValue());
|
||||
ui->prismHeight->bind(static_cast<PartDesign::Prism*>(vp->getObject())->Height);
|
||||
ui->prismXSkew->setValue(static_cast<PartDesign::Prism*>(vp->getObject())->FirstSkew.getValue());
|
||||
ui->prismXSkew->bind(static_cast<PartDesign::Prism*>(vp->getObject())->FirstSkew);
|
||||
ui->prismYSkew->setValue(static_cast<PartDesign::Prism*>(vp->getObject())->SecondSkew.getValue());
|
||||
ui->prismYSkew->bind(static_cast<PartDesign::Prism*>(vp->getObject())->SecondSkew);
|
||||
ui->prismXSkew->setValue(static_cast<PartDesign::Prism*>(vp->getObject())->FirstAngle.getValue());
|
||||
ui->prismXSkew->bind(static_cast<PartDesign::Prism*>(vp->getObject())->FirstAngle);
|
||||
ui->prismYSkew->setValue(static_cast<PartDesign::Prism*>(vp->getObject())->SecondAngle.getValue());
|
||||
ui->prismYSkew->bind(static_cast<PartDesign::Prism*>(vp->getObject())->SecondAngle);
|
||||
ui->prismCircumradius->setMaximum(INT_MAX);
|
||||
ui->prismCircumradius->setMinimum(0.0);
|
||||
ui->prismHeight->setMaximum(INT_MAX);
|
||||
@@ -531,14 +531,14 @@ void TaskBoxPrimitives::onPrismXSkewChanged(double v) {
|
||||
// we must assure that if the user incremented from e.g. 85 degree with the
|
||||
// spin buttons he does not end at 90.0 but 89.9999 which is shown rounded to 90 degree
|
||||
if ((v < 90.0) && (v > -90.0)) {
|
||||
sph->FirstSkew.setValue(v);
|
||||
sph->FirstAngle.setValue(v);
|
||||
}
|
||||
else {
|
||||
if (v == 90.0)
|
||||
sph->FirstSkew.setValue(89.99999);
|
||||
sph->FirstAngle.setValue(89.99999);
|
||||
else if (v == -90.0)
|
||||
sph->FirstSkew.setValue(-89.99999);
|
||||
ui->prismXSkew->setValue(sph->FirstSkew.getQuantityValue());
|
||||
sph->FirstAngle.setValue(-89.99999);
|
||||
ui->prismXSkew->setValue(sph->FirstAngle.getQuantityValue());
|
||||
}
|
||||
vp->getObject()->getDocument()->recomputeFeature(vp->getObject());
|
||||
}
|
||||
@@ -548,14 +548,14 @@ void TaskBoxPrimitives::onPrismYSkewChanged(double v) {
|
||||
// we must assure that if the user incremented from e.g. 85 degree with the
|
||||
// spin buttons he does not end at 90.0 but 89.9999 which is shown rounded to 90 degree
|
||||
if ((v < 90.0) && (v > -90.0)) {
|
||||
sph->SecondSkew.setValue(v);
|
||||
sph->SecondAngle.setValue(v);
|
||||
}
|
||||
else {
|
||||
if (v == 90.0)
|
||||
sph->SecondSkew.setValue(89.99999);
|
||||
sph->SecondAngle.setValue(89.99999);
|
||||
else if (v == -90.0)
|
||||
sph->SecondSkew.setValue(-89.99999);
|
||||
ui->prismYSkew->setValue(sph->SecondSkew.getQuantityValue());
|
||||
sph->SecondAngle.setValue(-89.99999);
|
||||
ui->prismYSkew->setValue(sph->SecondAngle.getQuantityValue());
|
||||
}
|
||||
vp->getObject()->getDocument()->recomputeFeature(vp->getObject());
|
||||
}
|
||||
@@ -733,8 +733,8 @@ void TaskBoxPrimitives::setPrimitive(App::DocumentObject *obj)
|
||||
"%1.Polygon=%2\n"
|
||||
"%1.Circumradius=%3\n"
|
||||
"%1.Height=%4\n"
|
||||
"%1.FirstSkew=%5\n"
|
||||
"%1.SecondSkew=%6\n")
|
||||
"%1.FirstAngle=%5\n"
|
||||
"%1.SecondAngle=%6\n")
|
||||
.arg(name)
|
||||
.arg(ui->prismPolygon->value())
|
||||
.arg(ui->prismCircumradius->value().getValue(), 0, 'f', Base::UnitsApi::getDecimals())
|
||||
|
||||
Reference in New Issue
Block a user