diff --git a/GUI/View/Numeric/DoubleSpinBox.cpp b/GUI/View/Numeric/DoubleSpinBox.cpp index eca2e643964003f9f939f699348620bd7bb1de68..162a2f0abf11fa6dcc077d8cbe33df60fddea8af 100644 --- a/GUI/View/Numeric/DoubleSpinBox.cpp +++ b/GUI/View/Numeric/DoubleSpinBox.cpp @@ -70,8 +70,10 @@ QAbstractSpinBox::StepEnabled DoubleSpinBox::stepEnabled() const double DoubleSpinBox::fromDisplay() const { double result; - ASSERT(Base::String::to_double(lineEdit()->text().toStdString(), &result)); - return result; + if (Base::String::to_double(lineEdit()->text().toStdString(), &result)) + return result; + // invalid input => restore last valid value + return m_valueProperty.value(); } void DoubleSpinBox::setValue(double val)