Skip to content

Commit

Permalink
Gui: enable range check in QuantitySpinBox when opening expression ed…
Browse files Browse the repository at this point in the history
…itor
  • Loading branch information
wwmayer committed Dec 19, 2022
1 parent 9cc78c4 commit d795753
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Gui/QuantitySpinBox.cpp
Expand Up @@ -516,6 +516,7 @@ void QuantitySpinBox::openFormulaDialog()

Q_D(const QuantitySpinBox);
auto box = new Gui::Dialog::DlgExpressionInput(getPath(), getExpression(), d->unit, this);
box->setRange(d->minimum, d->maximum);
QObject::connect(box, &Gui::Dialog::DlgExpressionInput::finished, [=]() {
if (box->result() == QDialog::Accepted)
setExpression(box->getExpression());
Expand Down

0 comments on commit d795753

Please sign in to comment.