]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_WidgetEditor.cpp
Salome HOME
Add tools
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetEditor.cpp
index 2b77ecafa7f60737e1410bcf1ad4a74486e97a29..5aa9aa24f8e3f11b456ad62a086e6f6e34077c93 100644 (file)
@@ -52,7 +52,11 @@ void editedValue(double& outValue, QString& outText)
   ModuleBase_ParamSpinBox* aEditor = new ModuleBase_ParamSpinBox(&aDlg);
   aEditor->setMinimum(0);
   aEditor->setMaximum(DBL_MAX);
-  aEditor->setValue(outValue);
+  if (outText.isEmpty())
+    aEditor->setValue(outValue);
+  else
+    aEditor->setText(outText);
+
   aLay->addWidget(aEditor);
 
   aEditor->setFocus();
@@ -95,6 +99,9 @@ void ModuleBase_WidgetEditor::showPopupEditor()
   //QApplication::processEvents();
   double aValue = mySpinBox->value();
   QString aText;
+  if (mySpinBox->hasVariable())
+    aText = mySpinBox->text();
+
   editedValue(aValue, aText);
   if (aText.isEmpty()) {
     ModuleBase_Tools::setSpinValue(mySpinBox, aValue);