Improve usability of expression dialog:

+ add signal showFormulaDialog to QuantitySpinBox in order to indicate whether the formula dialog opens or closes
+ when formula dialog opens then hide the button box in the parent dialog, show it again when the formula dialog closes
This commit is contained in:
wmayer
2018-08-23 12:22:57 +02:00
parent 0252e491d5
commit 93163b28d0
3 changed files with 40 additions and 0 deletions

View File

@@ -587,6 +587,8 @@ void QuantitySpinBox::openFormulaDialog()
QPoint pos = mapToGlobal(QPoint(0,0));
box->move(pos-box->expressionPosition());
box->setExpressionInputSize(width(), height());
Q_EMIT showFormulaDialog(true);
}
void QuantitySpinBox::finishFormulaDialog()
@@ -603,6 +605,8 @@ void QuantitySpinBox::finishFormulaDialog()
setExpression(boost::shared_ptr<Expression>());
box->deleteLater();
Q_EMIT showFormulaDialog(false);
}
Base::Unit QuantitySpinBox::unit() const