From 298eadbd925db33a07b407b6aef70d51d44018ec Mon Sep 17 00:00:00 2001 From: akl Date: Fri, 6 Dec 2013 05:56:02 +0000 Subject: [PATCH] Fix of INTPAL0052203 (TC7.3.0 Impossible to create copy of geometry object during Copy/Paste operation): add a new object into UseCaseTree. --- src/GEOM_I/GEOM_Gen_i.cc | 5 +++++ 1 file changed, 5 insertions(+) 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(); } -- 2.39.2