diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 70866b94d5ef..cbd5d5a5997c 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -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()); box->deleteLater(); + + Q_EMIT showFormulaDialog(false); } Base::Unit QuantitySpinBox::unit() const diff --git a/src/Gui/QuantitySpinBox.h b/src/Gui/QuantitySpinBox.h index d754d091b68e..d57070919c3d 100644 --- a/src/Gui/QuantitySpinBox.h +++ b/src/Gui/QuantitySpinBox.h @@ -153,6 +153,10 @@ protected Q_SLOTS: * like: minimum, maximum and/or the right Unit (if specified). */ void valueChanged(double); + /** Gets emitted if formula dialog is about to be opened (true) + * or finished (false). + */ + void showFormulaDialog(bool); private: QScopedPointer d_ptr; diff --git a/src/Mod/Sketcher/Gui/InsertDatum.ui b/src/Mod/Sketcher/Gui/InsertDatum.ui index faa86b007bd8..9d451dc63229 100644 --- a/src/Mod/Sketcher/Gui/InsertDatum.ui +++ b/src/Mod/Sketcher/Gui/InsertDatum.ui @@ -48,6 +48,19 @@ + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -65,6 +78,9 @@ Gui::PrefQuantitySpinBox QWidget
Gui/PrefWidgets.h
+ + showFormulaDialog(bool) + @@ -101,5 +117,21 @@ + + labelEdit + showFormulaDialog(bool) + buttonBox + setHidden(bool) + + + 212 + 26 + + + 171 + 101 + + +