From 2ad8328311d8e82f0a025344128bfe8cae803c88 Mon Sep 17 00:00:00 2001 From: ptv Date: Fri, 6 Feb 2009 12:12:50 +0000 Subject: [PATCH] fix problem with nodes/elements IDS --- src/Controls/SMESH_Controls.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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) ); + } } } -- 2.30.2