X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHDS%2FSMESHDS_GroupBase.cxx;h=95a91cd0c7f5e40f09de0e75b18e9cfb528b67b2;hb=46c12766bce7d48c0c9ecc772b47ba12a18afb6b;hp=818c52009306bfed4f4b76d5096f4f8543377c49;hpb=7eda9ca931ed2a11cb5e4637e4ffe19f5c061115;p=modules%2Fsmesh.git diff --git a/src/SMESHDS/SMESHDS_GroupBase.cxx b/src/SMESHDS/SMESHDS_GroupBase.cxx index 818c52009..95a91cd0c 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 false; SMDS_ElemIteratorPtr it = GetElements(); return ( !it || !it->more() ); }