Salome HOME
Block signals when adding parameters
authorsbh <sergey.belash@opencascade.com>
Thu, 16 Apr 2015 17:30:00 +0000 (20:30 +0300)
committersbh <sergey.belash@opencascade.com>
Thu, 16 Apr 2015 17:30:00 +0000 (20:30 +0300)
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp

index 551f9e7c8bfa2afa74aba0b190e449790bd122eb..9e222e9869d3d007ef441173dc7b041830977705 100644 (file)
@@ -134,7 +134,9 @@ bool ModuleBase_WidgetDoubleValue::restoreValue()
   AttributeDoublePtr aRef = aData->real(attributeID());
   std::string aTextRepr = aRef->text();
   if (!aTextRepr.empty()) {
+    bool isBlocked = mySpinBox->blockSignals(true);
     mySpinBox->setText(QString::fromStdString(aTextRepr));
+    mySpinBox->blockSignals(isBlocked);
   } else {
     ModuleBase_Tools::setSpinValue(mySpinBox, aRef->value());
   }