]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
authornds <natalia.donis@opencascade.com>
Fri, 13 Feb 2015 15:05:16 +0000 (18:05 +0300)
committernds <natalia.donis@opencascade.com>
Fri, 13 Feb 2015 15:05:16 +0000 (18:05 +0300)
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp

index cd1cc4565516040add4c830fc3ea2b6100595618..b18aa208985493c27f3989c2d7a3d657be41ec3d 100644 (file)
@@ -82,7 +82,7 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
   double aDefVal = QString::fromStdString(myDefaultValue).toDouble(&isOk);
   if (isOk) {
     mySpinBox->setValue(aDefVal);
-  } else if (aProp == DOUBLE_WDG_DEFAULT_COMPUTED){
+  } else if (theData->getProperty(ATTR_DEFAULT) == DOUBLE_WDG_DEFAULT_COMPUTED){
     myIsComputedDefault = true;
   }
 
@@ -101,6 +101,9 @@ ModuleBase_WidgetDoubleValue::~ModuleBase_WidgetDoubleValue()
 
 void ModuleBase_WidgetDoubleValue::reset()
 {
+  if (myIsComputedDefault)
+    return;
+
   bool isOk;
   double aDefValue = QString::fromStdString(myDefaultValue).toDouble(&isOk);
   mySpinBox->setValue(isOk ? aDefValue : 0.0);