From: eap Date: Wed, 22 Jun 2011 12:45:25 +0000 (+0000) Subject: In PublishGroup(), set an icon corresponding to group emptiness X-Git-Tag: V6_3_1rc1~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4d58862b1b6499152c7e266244aa8d0db874b986;p=modules%2Fsmesh.git In PublishGroup(), set an icon corresponding to group emptiness --- diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index 41095815c..9948b7d7d 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -694,7 +694,10 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr theStudy SetName( aRootSO, aRootNames[aType] ); // Add new group to corresponding sub-tree - aGroupSO = publish (theStudy, theGroup, aRootSO, 0, "ICON_SMESH_TREE_GROUP" ); + SMESH::array_of_ElementType_var elemTypes = theGroup->GetTypes(); + const int isEmpty = ( elemTypes->length() == 0 ); + const char* pm[2] = { "ICON_SMESH_TREE_GROUP", "ICON_SMESH_TREE_MESH_WARN" }; + aGroupSO = publish (theStudy, theGroup, aRootSO, 0, pm[ isEmpty ] ); } if ( aGroupSO->_is_nil() ) return aGroupSO._retn();