diff --git a/src/Gui/Placement.cpp b/src/Gui/Placement.cpp index 382f460593..0777c4fbe8 100644 --- a/src/Gui/Placement.cpp +++ b/src/Gui/Placement.cpp @@ -658,6 +658,10 @@ void Placement::bindObject() ui->yawAngle ->bind(App::ObjectIdentifier::parse(obj, propertyName + std::string(".Rotation.Yaw"))); ui->pitchAngle->bind(App::ObjectIdentifier::parse(obj, propertyName + std::string(".Rotation.Pitch"))); ui->rollAngle ->bind(App::ObjectIdentifier::parse(obj, propertyName + std::string(".Rotation.Roll"))); + + ui->yawAngle->evaluateExpression(); + ui->pitchAngle->evaluateExpression(); + ui->rollAngle->evaluateExpression(); } } diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 8dfc4fd436..7185118236 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -417,6 +417,13 @@ QString Gui::QuantitySpinBox::expressionText() const return QString(); } +void QuantitySpinBox::evaluateExpression() +{ + if (isBound() && getExpression()) { + showValidExpression(Number::SetIfNumber); + } +} + void Gui::QuantitySpinBox::setNumberExpression(App::NumberExpression* expr) { lineEdit()->setText(getUserString(expr->getQuantity())); diff --git a/src/Gui/QuantitySpinBox.h b/src/Gui/QuantitySpinBox.h index 3134520e13..e06503a66a 100644 --- a/src/Gui/QuantitySpinBox.h +++ b/src/Gui/QuantitySpinBox.h @@ -108,6 +108,7 @@ public: /// Gets the expression as a string QString expressionText() const; + void evaluateExpression(); /// Set the number portion selected void selectNumber();