fix problem with nodes/elements IDS

This commit is contained in:
ptv 2009-02-06 12:12:50 +00:00
parent dbaabcfcdb
commit 2ad8328311

View File

@ -1877,10 +1877,13 @@ void GroupColor::SetMesh( const SMDS_Mesh* theMesh )
if ( myType != SMDSAbs_All && myType != (SMDSAbs_ElementType)aGrp->GetType() ) if ( myType != SMDSAbs_All && myType != (SMDSAbs_ElementType)aGrp->GetType() )
continue; continue;
// add elements IDS into control SMDSAbs_ElementType aGrpElType = (SMDSAbs_ElementType)aGrp->GetType();
int aSize = aGrp->Extent(); if ( myType == aGrpElType || (myType == SMDSAbs_All && aGrpElType != SMDSAbs_Node) ) {
for (int i = 0; i < aSize; i++) // add elements IDS into control
myIDs.insert( aGrp->GetID(i+1) ); int aSize = aGrp->Extent();
for (int i = 0; i < aSize; i++)
myIDs.insert( aGrp->GetID(i+1) );
}
} }
} }