X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeRefAttrList.cpp;h=e1ffa3b62ea2987ee3f9949d06dde7c99c476613;hb=b5eaf6f6971771b1e39f55ba5fc484e2f150ffb8;hp=3cfd46274cc54ce37279d6dd3242c9185c9806be;hpb=3e40e36af7bb9e49d10924383c71efd6c8186c16;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeRefAttrList.cpp b/src/Model/Model_AttributeRefAttrList.cpp index 3cfd46274..e1ffa3b62 100755 --- a/src/Model/Model_AttributeRefAttrList.cpp +++ b/src/Model/Model_AttributeRefAttrList.cpp @@ -308,11 +308,17 @@ void Model_AttributeRefAttrList::remove(const std::set& theIndices) Model_AttributeRefAttrList::Model_AttributeRefAttrList(TDF_Label& theLabel) { - myIsInitialized = theLabel.FindAttribute(TDataStd_ReferenceList::GetID(), myRef) == Standard_True; + myLab = theLabel; + reinit(); +} + +void Model_AttributeRefAttrList::reinit() +{ + myIsInitialized = myLab.FindAttribute(TDataStd_ReferenceList::GetID(), myRef) == Standard_True; if (!myIsInitialized) { - myRef = TDataStd_ReferenceList::Set(theLabel); - myIDs = TDataStd_ExtStringList::Set(theLabel); + myRef = TDataStd_ReferenceList::Set(myLab); + myIDs = TDataStd_ExtStringList::Set(myLab); } else { - theLabel.FindAttribute(TDataStd_ExtStringList::GetID(), myIDs); + myLab.FindAttribute(TDataStd_ExtStringList::GetID(), myIDs); } }