]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
code shorten
authoreap <eap@opencascade.com>
Thu, 25 Oct 2012 11:57:36 +0000 (11:57 +0000)
committereap <eap@opencascade.com>
Thu, 25 Oct 2012 11:57:36 +0000 (11:57 +0000)
src/Controls/SMESH_Controls.cxx

index 8645fb8ca7bf889dd4025b25962877a0d2e3b01a..2fe0e08891904acfef1deea8223a59c85781cad5 100644 (file)
@@ -3725,26 +3725,7 @@ void ElementsOnShape::SetShape (const TopoDS_Shape&       theShape,
   
   if ( !myMesh ) return;
 
-  switch (myType)
-  {
-  case SMDSAbs_All:
-    myIds.ReSize(myMesh->NbEdges() + myMesh->NbFaces() + myMesh->NbVolumes());
-    break;
-  case SMDSAbs_Node:
-    myIds.ReSize(myMesh->NbNodes());
-    break;
-  case SMDSAbs_Edge:
-    myIds.ReSize(myMesh->NbEdges());
-    break;
-  case SMDSAbs_Face:
-    myIds.ReSize(myMesh->NbFaces());
-    break;
-  case SMDSAbs_Volume:
-    myIds.ReSize(myMesh->NbVolumes());
-    break;
-  default:
-    break;
-  }
+  myIds.ReSize( myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType ));
 
   myShapesMap.Clear();
   addShape(myShape);