From 07d28083ec4e162cbaec8a53d022dd291beea764 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 22 Jun 2011 15:51:42 +0000 Subject: [PATCH] In PublishSubMesh(), set an icon corresponding to group emptiness --- src/SMESH_I/SMESH_Gen_i_1.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); } -- 2.39.2