Salome HOME
Fix for crash on multi-selection of group-vertices on imported body with Shift-key...
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetDoubleValue.cpp
index d3d777e33fe59467ebf04f8aaeee260bbe664c71..a17ea26c9793ee4a8c3acab86dc7f5df40b0646b 100644 (file)
@@ -104,8 +104,12 @@ void ModuleBase_WidgetDoubleValue::reset()
   else {
     bool isOk;
     double aDefValue = QString::fromStdString(getDefaultValue()).toDouble(&isOk);
-    ModuleBase_Tools::setSpinValue(mySpinBox, isOk ? aDefValue : 0.0);
-    storeValueCustom();
+    // reset the value just if there is a default value definition in the XML definition
+    // if the double value can not be found by the default value, do nothing
+    if (isOk) {
+      ModuleBase_Tools::setSpinValue(mySpinBox, isOk ? aDefValue : 0.0);
+      storeValueCustom();
+    }
   }
 }