]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2121: Problems when editing a radius value
authornds <nds@opencascade.com>
Tue, 11 Apr 2017 04:59:33 +0000 (07:59 +0300)
committernds <nds@opencascade.com>
Tue, 11 Apr 2017 04:59:33 +0000 (07:59 +0300)
src/ModuleBase/ModuleBase_WidgetEditor.cpp

index 3adc21b0d452e653b5a0c32ed4665bdfb3caca70..edaecab322fb33046cfac59a720cb7528f5b364a 100644 (file)
@@ -111,6 +111,11 @@ bool ModuleBase_WidgetEditor::showPopupEditor(const bool theSendSignals)
   isValueAccepted = editedValue(aValue, aText);
   if (isValueAccepted) {
     if (aText.isEmpty()) {
+      if (mySpinBox->hasVariable()) {
+        // variable text should be cleared before setting value as the value
+        // will not be set if there is a varable in control
+        ModuleBase_Tools::setSpinText(mySpinBox, "");
+      }
       ModuleBase_Tools::setSpinValue(mySpinBox, aValue);
     } else {
       ModuleBase_Tools::setSpinText(mySpinBox, aText);