{
// the back reference from the previous object to the attribute should be removed
ObjectPtr anObject = object();
- if (theObject && (!myIsInitialized || myID->Get().Length() != 0 || object() != theObject)) {
+ if (theObject.get() && (!myIsInitialized || myID->Get().Length() != 0 || object() != theObject)) {
REMOVE_BACK_REF(anObject);
std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(
return ObjectPtr();
}
+bool Model_AttributeRefAttr::isInitialized()
+{
+ if (myRef->Get() == myRef->Label()) { // empty is not initialized: sketch parallelity
+ return false;
+ }
+ return ModelAPI_AttributeRefAttr::isInitialized();
+}
+
Model_AttributeRefAttr::Model_AttributeRefAttr(TDF_Label& theLabel)
{
myIsInitialized = theLabel.FindAttribute(TDataStd_Comment::GetID(), myID) == Standard_True;