From: eap Date: Thu, 25 Oct 2012 11:57:36 +0000 (+0000) Subject: code shorten X-Git-Tag: V6_6_0b1~37 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8f17999ad4420345fe219962bb011d994a82728a;p=modules%2Fsmesh.git code shorten --- diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 8645fb8ca..2fe0e0889 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -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);