Salome HOME
22406: EDF SMESH Regression : Items are missing in group contextual menu
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Selection.cxx
index 86a9292141693bf30ae063814bd47c386ffec12d..6e82d5b46c4708698a48b543c105080f67b49cc3 100644 (file)
@@ -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() ? 0 : 1; // aGroupObj->Size();
     }
   }
   return 0;