Salome HOME
22874: [CEA 1425] Performance SMESH Module
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.cxx
index 30182b09970794e66a70f706824ef5249484875e..3b7cc5516e9b3316942143ff03bc7c2293c8c218 100644 (file)
@@ -474,8 +474,9 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
   myHypothesis_i = aCreator->Create(myPoa, GetCurrentStudyID(), &myGen);
   if (myHypothesis_i)
   {
-    myHypothesis_i->SetLibName(aPlatformLibName.c_str()); // for persistency assurance
-    myHypCreatorMap[ myHypothesis_i->GetName() ] = aCreator;
+    myHypothesis_i->SetLibName( aPlatformLibName.c_str() ); // for persistency assurance
+    CORBA::String_var hypName = myHypothesis_i->GetName();
+    myHypCreatorMap[ hypName.in() ] = aCreator;
 
     // activate the CORBA servant of hypothesis
     hypothesis_i = myHypothesis_i->_this();
@@ -2399,7 +2400,6 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
   typedef map<int, int> TIDsMap;
   typedef list<SMESH::SMESH_Group_var> TListOfNewGroups;
   typedef map< pair<string, SMESH::ElementType>, TListOfNewGroups > TGroupsMap;
-  typedef std::set<SMESHDS_GroupBase*> TGroups;
 
   TPythonDump* pPythonDump = new TPythonDump;
   TPythonDump& aPythonDump = *pPythonDump; // prevent dump of called methods
@@ -2416,7 +2416,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
 
       TGroupsMap aGroupsMap;
       TListOfNewGroups aListOfNewGroups;
-      SMESH_MeshEditor aNewEditor = ::SMESH_MeshEditor(&aLocMesh);
+      ::SMESH_MeshEditor aNewEditor(&aLocMesh);
       SMESH::ListOfGroups_var aListOfGroups = new SMESH::ListOfGroups();
 
       // loop on meshes
@@ -2525,6 +2525,8 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
               }
             } //elems loop
 
+            aNewEditor.CrearLastCreated(); // forget the history
+
             // copy orphan nodes
             SMDS_NodeIteratorPtr  itNodes = anInitMeshDS->nodesIterator();
             while ( itNodes->more() )