From: akl Date: Fri, 6 Dec 2013 05:56:02 +0000 (+0000) Subject: Fix of INTPAL0052203 (TC7.3.0 Impossible to create copy of geometry object during... X-Git-Tag: V7_3_0~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=298eadbd925db33a07b407b6aef70d51d44018ec;p=modules%2Fgeom.git Fix of INTPAL0052203 (TC7.3.0 Impossible to create copy of geometry object during Copy/Paste operation): add a new object into UseCaseTree. --- diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 6856f7a0d..69dd6cd65 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -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(); }