X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeDouble.cpp;fp=src%2FModel%2FModel_AttributeDouble.cpp;h=c65748dee83f50d4273fd6ccab3b29a8b199487e;hb=16d1695b03bd17ebf4ba4a26e41956d1dd7a89d8;hp=29ca7be4e70d4b9bfcc6dae4a98dd792b91be369;hpb=a56db4993bab53bc45a338337142fe59a755f95b;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeDouble.cpp b/src/Model/Model_AttributeDouble.cpp index 29ca7be4e..c65748dee 100644 --- a/src/Model/Model_AttributeDouble.cpp +++ b/src/Model/Model_AttributeDouble.cpp @@ -10,6 +10,7 @@ #include #include +#include using namespace std; @@ -52,3 +53,19 @@ string Model_AttributeDouble::text() { return TCollection_AsciiString(myText->Get()).ToCString(); } + +Standard_GUID kInvalidGUID("caee5ce4-34b1-4b29-abcb-685287d18096"); + +void Model_AttributeDouble::setExpressionInvalid(const bool theFlag) +{ + if (theFlag) { + TDataStd_UAttribute::Set(myReal->Label(), kInvalidGUID); + } else { + myReal->Label().ForgetAttribute(kInvalidGUID); + } +} + +bool Model_AttributeDouble::expressionInvalid() +{ + return myReal->Label().IsAttribute(kInvalidGUID); +}