Salome HOME
Make automatic/manual rebuild property and connect the "Rebuild" button
[modules/shaper.git] / src / Model / Model_Data.cpp
index 2530dd5671b15cf28790b67d5daf82d9da0ecf3f..26f537d689aa677e3e9bc36bbcd0bd1b2a79d4ee 100644 (file)
@@ -20,6 +20,7 @@
 #include <Events_Error.h>
 
 #include <TDataStd_Name.hxx>
+#include <TDataStd_UAttribute.hxx>
 
 #include <string>
 
@@ -283,3 +284,18 @@ void Model_Data::erase()
   if (!myLab.IsNull())
     myLab.ForgetAllAttributes();
 }
+
+Standard_GUID kMustBeUpdatedGUID("baede74c-31a6-4416-9c4d-e48ce65f2005");
+
+void Model_Data::mustBeUpdated(const bool theFlag)
+{
+  if (theFlag)
+    TDataStd_UAttribute::Set(myLab, kMustBeUpdatedGUID);
+  else
+    myLab.ForgetAttribute(kMustBeUpdatedGUID);
+}
+
+bool Model_Data::mustBeUpdated()
+{
+  return myLab.IsAttribute(kMustBeUpdatedGUID) == Standard_True;
+}