diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index 3cec76ed7c..608fab4e0f 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -886,6 +886,7 @@ void QuantitySpinBox::stepBy(int steps) } Quantity quant(val, d->unitStr.toStdString()); + quant.setFormat(d->quantity.getFormat()); updateText(quant); updateFromCache(true); update(); diff --git a/src/Gui/QuantitySpinBox.h b/src/Gui/QuantitySpinBox.h index 691ebf8d1c..fe9a7c6728 100644 --- a/src/Gui/QuantitySpinBox.h +++ b/src/Gui/QuantitySpinBox.h @@ -46,6 +46,7 @@ class GuiExport QuantitySpinBox: public QAbstractSpinBox, public ExpressionSpinB double singleStep READ singleStep WRITE setSingleStep ) // clazy:exclude=qproperty-without-notify Q_PROPERTY(double rawValue READ rawValue WRITE setValue NOTIFY valueChanged) + Q_PROPERTY(double decimals READ decimals WRITE setDecimals) Q_PROPERTY(Base::Quantity value READ value WRITE setValue NOTIFY valueChanged USER true) Q_PROPERTY( QString binding READ boundToName WRITE setBoundToByName