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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user