Fix of INTPAL0052203 (TC7.3.0 Impossible to create copy of geometry object during Copy/Paste operation):

add a new object into UseCaseTree.
This commit is contained in:
akl 2013-12-06 05:56:02 +00:00
parent aa72decd35
commit 298eadbd92

View File

@ -746,6 +746,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
// Find the current Study and StudyBuilder
SALOMEDS::Study_var aStudy = theObject->GetStudy();
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
SALOMEDS::UseCaseBuilder_var anUseCaseBuilder = aStudy->GetUseCaseBuilder();
SALOMEDS::SObject_var aNewSO;
// Retrieve a TopoDS_Shape from byte stream
TopoDS_Shape aTopology;
@ -782,6 +783,10 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
anIOR->SetValue(objStr.in());
anIOR->UnRegister();
// add object to the use case tree
// (to support tree representation customization and drag-n-drop)
anUseCaseBuilder->AppendTo( aNewSO->GetFather(), aNewSO );
// Return the created in the Study SObject
return aNewSO._retn();
}