X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Data.cpp;h=82cc259187f241baf8d61af17ecd4be53b79251a;hb=f7a976b98d8cadadcb54a61e42ddb66e00759689;hp=477bf0e83c71dc514bf4472e97512d3d4d3372fd;hpb=fc1ceede402063c995d9c6ed5e8e21db7dfd9be4;p=modules%2Fshaper.git diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index 477bf0e83..82cc25918 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -317,7 +318,7 @@ static void copyAttrs(TDF_Label theSource, TDF_Label theDestination) { aTargetAttr = anAttrIter.Value()->NewEmpty(); theDestination.AddAttribute(aTargetAttr); } - Handle(TDF_RelocationTable) aRelocTable; // no relocation, empty map + Handle(TDF_RelocationTable) aRelocTable = new TDF_RelocationTable(); // no relocation, empty map anAttrIter.Value()->Paste(aTargetAttr, aRelocTable); } // copy the sub-labels content @@ -331,4 +332,11 @@ void Model_Data::copyTo(std::shared_ptr theTarget) { TDF_Label aTargetRoot = std::dynamic_pointer_cast(theTarget)->label(); copyAttrs(myLab, aTargetRoot); + // make initialized the initialized attributes + std::map >::iterator aMyIter = myAttrs.begin(); + for(; aMyIter != myAttrs.end(); aMyIter++) { + if (aMyIter->second->isInitialized()) { + theTarget->attribute(aMyIter->first)->setInitialized(); + } + } }