Salome HOME
Merge branch 'Dev_1.2.0' of newgeom:newgeom into Dev_1.2.0
[modules/shaper.git] / src / ModelAPI / ModelAPI_Attribute.cpp
index 249353c542248d346501ff94ba5b969318307846..e7553a05da282865ec233007a0e627e3a8b4e446 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;