From: azv Date: Wed, 18 Mar 2015 12:14:40 +0000 (+0300) Subject: Fix by MPV X-Git-Tag: V_1.1.0~109^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=564cd05d147db7d0de6e9ca0e935328e04a6139c;p=modules%2Fshaper.git Fix by MPV --- 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(); + } + } }