From: rnv Date: Wed, 17 Apr 2013 11:07:16 +0000 (+0000) Subject: Fix cmake compilation problem. X-Git-Tag: V6_main_FINAL^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=28e006fbde9c1a50aca65181b0c96c66a5c6053a;p=modules%2Fgeom.git Fix cmake compilation problem. --- diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 34ef37119..f33e9af76 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -669,7 +669,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::SObject_var aNewSO; // Retrieve a TopoDS_Shape from byte stream TopoDS_Shape aTopology; std::istringstream aStreamedBrep((char*) &theStream[0]); @@ -677,11 +677,11 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream, try { BRepTools::Read(aTopology, aStreamedBrep, aBuilder); } catch (Standard_Failure) { - return false; + return aNewSO._retn(); } // SObject of the created shape is theObject or new Child of Component if theObject == geom component - SALOMEDS::SObject_var aNewSO; + if (strcmp(theObject->GetFatherComponent()->GetID(),theObject->GetID()) == 0) { aNewSO = aStudyBuilder->NewObject(theObject); } else aNewSO = SALOMEDS::SObject::_duplicate(theObject);