Salome HOME
Dump to python corrected.
[modules/hydro.git] / src / HYDROData / HYDROData_Region.cxx
index 406993746966327df83abb31f0c2c5134f9b5179..03c91d34ab557e81cc434e99b342247dadbb0e6a 100644 (file)
@@ -44,7 +44,7 @@ HYDROData_Region::~HYDROData_Region()
 QStringList HYDROData_Region::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
 {
   QStringList aResList = dumpObjectCreation( theTreatedObjects );
-  QString aRegionName = GetName();
+  QString aRegionName = GetObjPyName();
 
   HYDROData_SequenceOfObjects aZones = GetZones();
   HYDROData_SequenceOfObjects::Iterator anIter( aZones );
@@ -188,17 +188,8 @@ void getUsedGroups( const TopoDS_Shape&                     theShape,
     {
       TopoDS_Shape aGroupEdge = anOriGroupDef.Shapes.Value( i );
       
-      bool anIsFound = false;
-      for ( int anIndex = 1; anIndex <= aMapOfSubShapes.Extent(); anIndex++ )
-      {
-        if ( aGroupEdge.IsPartner( aMapOfSubShapes.FindKey( anIndex ) ) )
-        {
-          anIsFound = true;
-          break;
-        }
-      }
-
-      if ( !anIsFound )
+      int aShapeIndex = aMapOfSubShapes.FindIndex( aGroupEdge );
+      if ( aShapeIndex <= 0 )
         continue;
 
       anOriGroupDef.Shapes.Remove( i );