]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix of INTPAL0052203 (TC7.3.0 Impossible to create copy of geometry object during...
authorakl <akl@opencascade.com>
Fri, 6 Dec 2013 05:56:02 +0000 (05:56 +0000)
committerakl <akl@opencascade.com>
Fri, 6 Dec 2013 05:56:02 +0000 (05:56 +0000)
 add a new object into UseCaseTree.

src/GEOM_I/GEOM_Gen_i.cc

index 6856f7a0dc196aba8cbe395bbceaaa5f41a470d4..69dd6cd6523c8e9cf822e0d56590b3b8ff090309 100644 (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();
 }