From: eap Date: Wed, 22 Jun 2011 15:51:42 +0000 (+0000) Subject: In PublishSubMesh(), set an icon corresponding to group emptiness X-Git-Tag: V6_3_1rc1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=07d28083ec4e162cbaec8a53d022dd291beea764;p=modules%2Fsmesh.git In PublishSubMesh(), 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 9948b7d7d..19fc2a975 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -632,7 +632,10 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr theS SetName( aRootSO, aRootName ); // Add new submesh to corresponding sub-tree - aSubMeshSO = publish (theStudy, theSubMesh, aRootSO, 0, "ICON_SMESH_TREE_MESH_WARN"); + SMESH::array_of_ElementType_var elemTypes = theSubMesh->GetTypes(); + const int isEmpty = ( elemTypes->length() == 0 ); + const char* pm[2] = { "ICON_SMESH_TREE_MESH", "ICON_SMESH_TREE_MESH_WARN" }; + aSubMeshSO = publish (theStudy, theSubMesh, aRootSO, 0, pm[isEmpty] ); if ( aSubMeshSO->_is_nil() ) return aSubMeshSO._retn(); }