From: vsr Date: Mon, 10 Jul 2017 09:15:07 +0000 (+0300) Subject: Migration on OCCT > 7.1: properly set TDataStd_ExtStringList attribute X-Git-Tag: V8_4_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b2668a7b3701a4e793245e7fd592232abc3b6ef9;p=modules%2Fgeom.git Migration on OCCT > 7.1: properly set TDataStd_ExtStringList attribute --- diff --git a/src/GEOM/GEOM_Function.cxx b/src/GEOM/GEOM_Function.cxx index e21a6df18..952dbd3e9 100644 --- a/src/GEOM/GEOM_Function.cxx +++ b/src/GEOM/GEOM_Function.cxx @@ -822,12 +822,7 @@ void GEOM_Function::AddSubShapeReference(Handle(GEOM_Function) theSubShape) TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL); - Handle(TDataStd_ExtStringList) aList; - if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) { - aList = new TDataStd_ExtStringList; - aSubShapesLabel.AddAttribute(aList); - } - + Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel ); TCollection_AsciiString anEntry; TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry); aList->Append(anEntry); @@ -880,11 +875,7 @@ const TDataStd_ListOfExtendedString& GEOM_Function::GetSubShapeReferences() TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL); - Handle(TDataStd_ExtStringList) aList; - if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) { - aList = new TDataStd_ExtStringList; - aSubShapesLabel.AddAttribute(aList); - } + Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel ); _isDone = true; return aList->List();