From: vsv Date: Mon, 18 May 2015 14:03:55 +0000 (+0300) Subject: Synchronize double value and text representation stored in attribute X-Git-Tag: V_1.2.0~148 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7d68d799dbff00a252e9075e2e31648447d45ca6;p=modules%2Fshaper.git Synchronize double value and text representation stored in attribute --- diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp index c9416f4a2..38d47563f 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp @@ -117,6 +117,9 @@ bool ModuleBase_WidgetDoubleValue::storeValueCustom() const AttributeDoublePtr aReal = aData->real(attributeID()); if (!mySpinBox->hasVariable()) { aReal->setValue(mySpinBox->value()); + // In order to synchronize value and text + // If it is not synchronized sometimes it could take vale not as a digit but as a string + aReal->setText(mySpinBox->text().toStdString()); } else { // Here is a text of a real value or an expression. std::string aText = mySpinBox->text().toStdString();