Salome HOME
fix CheckGeomGroupModif() for the case of a mesh on a geom group
authoreap <eap@opencascade.com>
Fri, 22 Mar 2013 15:33:42 +0000 (15:33 +0000)
committereap <eap@opencascade.com>
Fri, 22 Mar 2013 15:33:42 +0000 (15:33 +0000)
src/SMESH_I/SMESH_Mesh_i.cxx

index cf844162374e6285040eda9a199d0916670d2919..653f68d3a1548205193c12cca01f641c11eff0c1 100644 (file)
@@ -1984,12 +1984,12 @@ void SMESH_Mesh_i::CheckGeomGroupModif()
         list<const SMESHDS_Hypothesis*>& hyps = indS_hyps->second;
         int oldID = geom._index;
         int newID = meshDS->ShapeToIndex( geom._shape );
-        if ( !newID )
-          continue;
         if ( oldID == 1 ) { // main shape
           newID = 1;
           geom._shape = newShape;
         }
+        if ( !newID )
+          continue;
         for ( hypIt = hyps.begin(); hypIt != hyps.end(); ++hypIt )
           _impl->AddHypothesis( geom._shape, (*hypIt)->GetID());
         // care of submeshes