From: eap Date: Thu, 14 Nov 2013 09:17:58 +0000 (+0000) Subject: 22372: EDF 2758 SMESH: Create/Manage groups on a mesh composed of nodes and balls X-Git-Tag: V7_3_0a1~66 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=301a74fd9859419f54f5cdca1d468b8e5c0a3152;p=modules%2Fsmesh.git 22372: EDF 2758 SMESH: Create/Manage groups on a mesh composed of nodes and balls Performance optimization for groups on filter: int SMESHGUI_Selection::numberOfNodes( int ind ) const { ... - return aGroupObj->Size(); + return aGroupObj->IsEmpty(); // aGroupObj->Size(); --- diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 86a929214..5656e4b44 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -382,7 +382,7 @@ bool SMESHGUI_Selection::isAutoColor( int ind ) const //======================================================================= //function : numberOfNodes -//purpose : +//purpose : this method is actually used to check if an object is empty or not //======================================================================= int SMESHGUI_Selection::numberOfNodes( int ind ) const @@ -401,7 +401,7 @@ int SMESHGUI_Selection::numberOfNodes( int ind ) const return aSubMeshObj->GetNumberOfNodes(true); SMESH::SMESH_GroupBase_var aGroupObj = SMESH::SMESH_GroupBase::_narrow( obj ); if ( !aGroupObj->_is_nil() ) - return aGroupObj->Size(); + return aGroupObj->IsEmpty(); // aGroupObj->Size(); } } return 0;