Gui: if an expression is set for Euler angles in the placement dialog then evaluate the expression instead of determining the angles from the rotation

See forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=72522
This commit is contained in:
wmayer
2022-10-26 11:27:46 +02:00
parent bcc9c6654c
commit 4d8e61549d
3 changed files with 12 additions and 0 deletions

View File

@@ -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()));