Salome HOME
IPAL21468 Copmpound is not Shown after its creation.
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.cxx
index bf37a72a909679a0faa842d7333c07c3e87fae23..e51f8c578484561d8cee590255072be1c5eeb81b 100644 (file)
@@ -2155,6 +2155,17 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
   {
     SMESH::ListOfGroups_var groups = aNewMesh->GetGroups();
   }
+
+  // IPAL21468 Change icon of compound because it need not be computed.
+  SALOMEDS::SObject_var aMeshSObj = ObjectToSObject( myCurrentStudy, aNewMesh );
+  if(aMeshSObj) {
+    SALOMEDS::GenericAttribute_var anAttr;
+    SALOMEDS::StudyBuilder_var aBuilder = myCurrentStudy->NewBuilder();
+    anAttr = aBuilder->FindOrCreateAttribute( aMeshSObj,"AttributePixMap" );
+    SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
+    aPixmap->SetPixMap("ICON_SMESH_TREE_MESH");
+  }
+
   return aNewMesh._retn();
 }