Salome HOME
Preparations for Split operation. It includes:
[modules/shaper.git] / src / ModuleBase / ModuleBase_ModelWidget.cpp
index 4420aff9a2e0e307c93798f40347a159d14db341..77d58959b1bd322e45e6c5b51ae41e5309c3e09a 100644 (file)
@@ -209,8 +209,13 @@ void ModuleBase_ModelWidget::setFeature(const FeaturePtr& theFeature, const bool
   /// after debug, it may be corrected
   myFlushUpdateBlocked = !isUpdateFlushed;
   myFeature = theFeature;
-  if (theToStoreValue)
-    storeValue();
+  if (theToStoreValue) {
+    /// it is possible that the attribute is filled before the operation is started,
+    /// e.g. by reentrant operation case some attributes are filled by values of
+    /// feature of previous operation, we should not lost them here
+    if (!theFeature->data()->attribute(attributeID())->isInitialized())
+      storeValue();
+  }
   myFlushUpdateBlocked = false;
 }