Salome HOME
Merge from V5_1_3_BR branch (07/12/09)
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.cxx
index dbf4fe43e57251a6a08f29f2cfcfa26b58e04fd1..899581804e70624205c88d31e152412faacb85dd 100644 (file)
@@ -1879,7 +1879,8 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
   typedef map< pair<string, SMESH::ElementType>, TListOfNewGroups > TGroupsMap;
   typedef std::set<SMESHDS_GroupBase*> TGroups;
 
-  TPythonDump aPythonDump; // prevent dump of called methods
+  TPythonDump* pPythonDump = new TPythonDump;
+  TPythonDump& aPythonDump = *pPythonDump; // prevent dump of called methods
 
   // create mesh
   SMESH::SMESH_Mesh_var aNewMesh = CreateEmptyMesh();
@@ -2147,6 +2148,24 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
               << theMergeNodesAndElements << ", "
               << theMergeTolerance << ")";
 
+  delete pPythonDump; // enable python dump from GetGroups()
+
+  // 0020577: EDF 1164 SMESH: Bad dump of concatenate with create common groups
+  if ( !aNewMesh->_is_nil() )
+  {
+    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->_is_nil() ) {
+    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();
 }