Salome HOME
-#if OCC_VERSION_LARGE > 0x06010000
[modules/smesh.git] / src / SMESH_I / SMESH_MeshEditor_i.cxx
index 7392590f42c87eb52de32c43e4c612110e7bc619..7a89a00cf3b0eff0f2927d8d9656ffe46377038a 100644 (file)
@@ -177,6 +177,10 @@ namespace MeshEditor_I {
       return _myMeshDS->AddNodeWithID(anElemNode->X(), anElemNode->Y(), anElemNode->Z(),
                                       anElemNode->GetID());
     }
+    void RemoveAll()
+    {
+      GetMeshDS()->ClearMesh();
+    }
   };// struct TPreviewMesh
 
   static SMESH_NodeSearcher *    theNodeSearcher    = 0;
@@ -454,6 +458,10 @@ SMESH_MeshEditor_i::SMESH_MeshEditor_i(SMESH_Mesh_i* theMesh, bool isPreview):
 
 SMESH_MeshEditor_i::~SMESH_MeshEditor_i()
 {
+  PortableServer::POA_var poa = SMESH_Gen_i::GetPOA();
+  PortableServer::ObjectId_var anObjectId = poa->servant_to_id(this);
+  poa->deactivate_object(anObjectId.in());
+
   //deleteAuxIDSources();
   delete myPreviewMesh;   myPreviewMesh = 0;
   delete myPreviewEditor; myPreviewEditor = 0;
@@ -468,7 +476,7 @@ SMESH_MeshEditor_i::~SMESH_MeshEditor_i()
 void SMESH_MeshEditor_i::initData(bool deleteSearchers)
 {
   if ( myIsPreviewMode ) {
-    if ( myPreviewMesh ) myPreviewMesh->Clear();
+    if ( myPreviewMesh ) myPreviewMesh->RemoveAll();
   }
   else {
     if ( deleteSearchers )
@@ -2554,7 +2562,7 @@ SMESH_MeshEditor_i::extrusionSweep(const SMESH::long_array & theIDsOfElements,
     theMakeGroups = false;
   }
 
-  TElemOfElemListMap aHystory;
+  ::SMESH_MeshEditor::TTElemOfElemListMap aHystory;
   ::SMESH_MeshEditor::PGroupIDs groupIds = 
       getEditor().ExtrusionSweep (*workElements, stepVec, theNbOfSteps, aHystory, theMakeGroups);
 
@@ -2846,7 +2854,7 @@ SMESH_MeshEditor_i::advancedExtrusion(const SMESH::long_array & theIDsOfElements
   const SMESH::PointStruct * P = &theStepVector.PS;
   gp_Vec stepVec( P->x, P->y, P->z );
 
-  TElemOfElemListMap aHystory;
+  ::SMESH_MeshEditor::TTElemOfElemListMap aHystory;
   ::SMESH_MeshEditor::PGroupIDs groupIds =
       getEditor().ExtrusionSweep (elements, stepVec, theNbOfSteps, aHystory,
                                   theMakeGroups, theExtrFlags, theSewTolerance);