From: ptv Date: Fri, 6 Feb 2009 12:12:50 +0000 (+0000) Subject: fix problem with nodes/elements IDS X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=2ad8328311d8e82f0a025344128bfe8cae803c88 fix problem with nodes/elements IDS --- diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 45e9f79ea..8ba13a8f1 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -1877,10 +1877,13 @@ void GroupColor::SetMesh( const SMDS_Mesh* theMesh ) if ( myType != SMDSAbs_All && myType != (SMDSAbs_ElementType)aGrp->GetType() ) continue; - // add elements IDS into control - int aSize = aGrp->Extent(); - for (int i = 0; i < aSize; i++) - myIDs.insert( aGrp->GetID(i+1) ); + SMDSAbs_ElementType aGrpElType = (SMDSAbs_ElementType)aGrp->GetType(); + if ( myType == aGrpElType || (myType == SMDSAbs_All && aGrpElType != SMDSAbs_Node) ) { + // add elements IDS into control + int aSize = aGrp->Extent(); + for (int i = 0; i < aSize; i++) + myIDs.insert( aGrp->GetID(i+1) ); + } } }