X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHDS%2FSMESHDS_GroupBase.cxx;h=0aad7f8a3483d57a652ba1a24eed77e9b07ac2f9;hb=0a237be4b91b6db526b340c534f40a385d6d65ab;hp=818c52009306bfed4f4b76d5096f4f8543377c49;hpb=7eda9ca931ed2a11cb5e4637e4ffe19f5c061115;p=modules%2Fsmesh.git diff --git a/src/SMESHDS/SMESHDS_GroupBase.cxx b/src/SMESHDS/SMESHDS_GroupBase.cxx index 818c52009..0aad7f8a3 100644 --- a/src/SMESHDS/SMESHDS_GroupBase.cxx +++ b/src/SMESHDS/SMESHDS_GroupBase.cxx @@ -51,7 +51,7 @@ SMESHDS_GroupBase::SMESHDS_GroupBase (const int theID, //============================================================================= /*! - * + * Don't use it! */ //============================================================================= @@ -124,6 +124,9 @@ int SMESHDS_GroupBase::Extent() const bool SMESHDS_GroupBase::IsEmpty() { + if ( myMesh->GetMeshInfo().NbElements( myType ) == 0 ) + // avoid long iteration over sub-meshes of a complex sub-mesh of a group on geometry + return true; SMDS_ElemIteratorPtr it = GetElements(); return ( !it || !it->more() ); }