Salome HOME
Constriction type for all sketch entities
[modules/shaper.git] / src / PartSet / PartSet_WidgetPoint2dDistance.cpp
index 086133dedeb2dd46cc0f551861c0b03ab317eaa6..14ac4592178c9bb0adae1f0cc05e963d1551ec2d 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <ModuleBase_DoubleSpinBox.h>
 #include <ModuleBase_IViewWindow.h>
+#include <ModuleBase_Tools.h>
 
 #include <XGUI_ViewerProxy.h>
 #include <XGUI_Workshop.h>
@@ -43,8 +44,9 @@ PartSet_WidgetPoint2dDistance::~PartSet_WidgetPoint2dDistance()
 void PartSet_WidgetPoint2dDistance::reset()
 {
   bool isOk;
-  double aDefValue = QString::fromStdString(myDefaultValue).toDouble(&isOk);
-  mySpinBox->setValue(isOk ? aDefValue : 0.0);
+  double aDefValue = QString::fromStdString(getDefaultValue()).toDouble(&isOk);
+
+  ModuleBase_Tools::setSpinValue(mySpinBox, isOk ? aDefValue : 0.0);
 }
 
 void PartSet_WidgetPoint2dDistance::setPoint(FeaturePtr theFeature,
@@ -60,9 +62,8 @@ void PartSet_WidgetPoint2dDistance::setPoint(FeaturePtr theFeature,
   AttributeDoublePtr aReal = aData->real(attributeID());
   if (aReal && (aReal->value() != aRadius)) {
     aReal->setValue(aRadius);
-    mySpinBox->blockSignals(true);
-    mySpinBox->setValue(aRadius);
-    mySpinBox->blockSignals(false);
+    
+    ModuleBase_Tools::setSpinValue(mySpinBox, aRadius);
     storeValue();
   }
 }