Salome HOME
Added the system of reinitialization of attributes instead of re-creation of them...
[modules/shaper.git] / src / Model / Model_AttributeBoolean.cpp
index f603def2d681f8ffbea1fa3b2cf146d286fce82c..d576a8870be398222cdac5052fae5879695467c9 100644 (file)
@@ -29,6 +29,11 @@ bool Model_AttributeBoolean::value()
 Model_AttributeBoolean::Model_AttributeBoolean(TDF_Label& theLabel)
 {
   myLab = theLabel;
+  reinit();
+}
+
+void Model_AttributeBoolean::reinit()
+{
   // check the attribute could be already presented in this doc (after load document)
-  myIsInitialized = theLabel.FindAttribute(TDataStd_Integer::GetID(), myBool) == Standard_True;
+  myIsInitialized = myLab.FindAttribute(TDataStd_Integer::GetID(), myBool) == Standard_True;
 }