Salome HOME
Fix for the issue #2808 : Documentation on the "Groups" panel. Added description...
[modules/shaper.git] / src / ModuleBase / ModuleBase_ParamSpinBox.cpp
index aa6eaca7cdb27409af911c41519fbf92de2bcee0..9990dfd200548ecfbe47a7075ecbbd4223c695f8 100644 (file)
@@ -162,7 +162,6 @@ void ModuleBase_ParamSpinBox::setValue(double value)
 
 double ModuleBase_ParamSpinBox::value() const
 {
-  std::string aa = lineEdit()->text().toStdString();
   return lineEdit()->text().toDouble();
 }
 
@@ -177,6 +176,12 @@ void ModuleBase_ParamSpinBox::setText(const QString& value)
     lineEdit()->setText(value);
     emit textChanged(value);
   }
+  else {
+    bool isConv = false;
+    double aVal = value.toDouble(&isConv);
+    if (isConv)
+      setValue(aVal);
+  }
 }
 
 /*!