X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshGroup.cxx;h=e945c285e506ad5c927e4d3a626936cd72f51e57;hp=b81ffe55a4dcaf614a0be982932c51e61fae2bfc;hb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;hpb=1067ffa6e7e5c394e3a1b17219d8b355a57607cd diff --git a/src/SMDS/SMDS_MeshGroup.cxx b/src/SMDS/SMDS_MeshGroup.cxx index b81ffe55a..e945c285e 100644 --- a/src/SMDS/SMDS_MeshGroup.cxx +++ b/src/SMDS/SMDS_MeshGroup.cxx @@ -122,17 +122,21 @@ void SMDS_MeshGroup::Clear() //purpose : //======================================================================= -void SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem) +bool SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem) { // the type of the group is determined by the first element added - if (myElements.empty()) myType = theElem->GetType(); + if (myElements.empty()) { + myType = theElem->GetType(); + } else if (theElem->GetType() != myType) { MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<GetType()<<"!="<