Salome HOME
Issue #1854 Recover feature control update
[modules/shaper.git] / src / ModelAPI / ModelAPI_Attribute.cpp
index 249353c542248d346501ff94ba5b969318307846..97373a087e11705e2c1eb7ad23f4f3bc0ef11d95 100644 (file)
@@ -30,7 +30,17 @@ bool ModelAPI_Attribute::isInitialized()
 
 void ModelAPI_Attribute::setInitialized()
 {
-  myIsInitialized = true;
+  if (!mySetInitializedBlocked)
+    myIsInitialized = true;
+}
+
+bool ModelAPI_Attribute::blockSetInitialized(const bool theBlock)
+{
+  bool aBlocked = mySetInitializedBlocked;
+
+  mySetInitializedBlocked = theBlock;
+
+  return aBlocked;
 }
 
 void ModelAPI_Attribute::setIsArgument(const bool theFlag)
@@ -62,6 +72,7 @@ const std::string& ModelAPI_Attribute::id() const
 
 ModelAPI_Attribute::ModelAPI_Attribute()
 {
+  mySetInitializedBlocked = false;
   myIsInitialized = false;
   myIsArgument = true;
   myIsImmutable = false;
@@ -72,3 +83,5 @@ void ModelAPI_Attribute::setID(const std::string theID)
 {
   myID = theID;
 }
+
+void ModelAPI_Attribute::reinit() {}