Migration on OCCT > 7.1: properly set TDataStd_ExtStringList attribute

This commit is contained in:
vsr 2017-07-10 12:15:07 +03:00
parent 338ca53024
commit b2668a7b37

View File

@ -822,12 +822,7 @@ void GEOM_Function::AddSubShapeReference(Handle(GEOM_Function) theSubShape)
TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL); TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
Handle(TDataStd_ExtStringList) aList; Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel );
if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
aList = new TDataStd_ExtStringList;
aSubShapesLabel.AddAttribute(aList);
}
TCollection_AsciiString anEntry; TCollection_AsciiString anEntry;
TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry); TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry);
aList->Append(anEntry); aList->Append(anEntry);
@ -880,11 +875,7 @@ const TDataStd_ListOfExtendedString& GEOM_Function::GetSubShapeReferences()
TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL); TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL);
Handle(TDataStd_ExtStringList) aList; Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel );
if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) {
aList = new TDataStd_ExtStringList;
aSubShapesLabel.AddAttribute(aList);
}
_isDone = true; _isDone = true;
return aList->List(); return aList->List();