From: vsv Date: Mon, 25 May 2015 08:13:37 +0000 (+0300) Subject: Set empty text if double value is set in editor X-Git-Tag: V_1.2.0~102 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=55f0582f0c216aac1da2a480ba9705d8ec11e2d8;p=modules%2Fshaper.git Set empty text if double value is set in editor --- diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp index 38d47563f..e2e8fa4e5 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp @@ -117,9 +117,7 @@ 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()); + aReal->setText(""); } else { // Here is a text of a real value or an expression. std::string aText = mySpinBox->text().toStdString(); diff --git a/src/ModuleBase/ModuleBase_WidgetEditor.cpp b/src/ModuleBase/ModuleBase_WidgetEditor.cpp index 1c26b11eb..29e07a1f3 100644 --- a/src/ModuleBase/ModuleBase_WidgetEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetEditor.cpp @@ -62,7 +62,7 @@ void editedValue(double& outValue, QString& outText) double aValue = outText.toDouble(&isDouble); if (isDouble) { outValue = aValue; - // outText = ""; // return empty string, if it's can be converted to a double + outText = ""; // return empty string, if it's can be converted to a double } aPopup->deleteLater(); }