X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Region.cxx;h=60210bbc30e700e689d31d8d9f0f40faac5b8262;hb=cde2ec476486fcd7c9b7b38ce814c648d73e7fd3;hp=194d80e6344902802068f0393603bf1820db5079;hpb=69048e668dcd9f681a48054df3b01a84d7ed773e;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Region.cxx b/src/HYDROData/HYDROData_Region.cxx index 194d80e6..60210bbc 100644 --- a/src/HYDROData/HYDROData_Region.cxx +++ b/src/HYDROData/HYDROData_Region.cxx @@ -52,7 +52,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Entity) HYDROData_Region::HYDROData_Region() - : HYDROData_Entity() + : HYDROData_Entity( Geom_2d ) { } @@ -107,7 +107,7 @@ bool HYDROData_Region::AddZone( const Handle(HYDROData_Zone)& theZone ) if ( !aFatherRegion.IsNull() && aFatherRegion->Label() != myLab ) { Handle(HYDROData_Zone) aNewZone = addNewZone( aDocument, "", TopoDS_Face(), QStringList() ); - theZone->CopyTo( aNewZone ); + theZone->CopyTo( aNewZone, false ); // To prevent changing of stored shape aNewZone->SetShape( theZone->GetShape() ); @@ -174,8 +174,7 @@ Handle(HYDROData_Zone) HYDROData_Region::addNewZone( const Handle(HYDROData_Docu for ( int i = 0, n = theRefObjects.length(); i < n; ++i ) { const QString& anObjName = theRefObjects.at( i ); - Handle(HYDROData_Object) aRefObject = - Handle(HYDROData_Object)::DownCast( theDoc->FindObjectByName( anObjName ) ); + Handle(HYDROData_Entity) aRefObject = theDoc->FindObjectByName( anObjName ); if ( aRefObject.IsNull() ) continue; @@ -389,7 +388,8 @@ TopoDS_Shape HYDROData_Region::GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs* return aResShape; } -QStringList HYDROData_Region::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const +QStringList HYDROData_Region::DumpToPython( const QString& thePyScriptPath, + MapOfTreatedObjects& theTreatedObjects ) const { QStringList aResList; @@ -434,7 +434,7 @@ QStringList HYDROData_Region::DumpToPython( MapOfTreatedObjects& theTreatedObjec } // add zone - setPythonReferenceObject( theTreatedObjects, aResList, aZone, "AddZone" ); + setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aZone, "AddZone" ); } return aResList;