Salome HOME
Join BR-D5-38-2003
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MultiEditDlg.cxx
index 2887e3c592a1ba96eb12fbe264bb06f0fa56cbcd..611365f8c2cf9684fb94fa1c669d786416a32a7c 100755 (executable)
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Desktop.h"
 
-#include "SalomeApp_SelectionMgr.h"
+#include "LightApp_SelectionMgr.h"
 #include "SALOME_ListIO.hxx"
 #include "SALOME_ListIteratorOfListIO.hxx"
 
 #include "SVTK_Selector.h"
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewWindow.h"
-#include "SVTK_InteractorStyle.h"
 
 // OCCT Includes
 #include <Precision.hxx>
@@ -438,7 +437,7 @@ void SMESHGUI_MultiEditDlg::onClose()
   SMESH::RemoveFilters();
   SMESH::SetPickable();
 
-  mySelectionMgr->clearSelected();
+  //mySelectionMgr->clearSelected();
   mySelectionMgr->clearFilters();
 
   reject();
@@ -504,8 +503,8 @@ void SMESHGUI_MultiEditDlg::onSelectionDone()
     myActor = SMESH::FindActorByEntry(aList.First()->getEntry());
     if (!myActor)
       myActor = SMESH::FindActorByObject(myMesh);
-    SVTK_InteractorStyle* aStyle = SMESH::GetInteractorStyle();
-    Handle(VTKViewer_Filter) aFilter = aStyle->GetFilter(myFilterType);
+    SVTK_Selector* aSelector = SMESH::GetSelector();
+    Handle(VTKViewer_Filter) aFilter = aSelector->GetFilter(myFilterType);
     if (!aFilter.IsNull())
       aFilter->SetActor(myActor);
   }
@@ -605,9 +604,9 @@ void SMESHGUI_MultiEditDlg::onFilterAccepted()
 //=======================================================================
 bool SMESHGUI_MultiEditDlg::isIdValid (const int theId) const
 {
-  SVTK_InteractorStyle* aStyle = SMESH::GetInteractorStyle();
+  SVTK_Selector* aSelector = SMESH::GetSelector();
   Handle(SMESHGUI_Filter) aFilter =
-    Handle(SMESHGUI_Filter)::DownCast(aStyle->GetFilter(myFilterType));
+    Handle(SMESHGUI_Filter)::DownCast(aSelector->GetFilter(myFilterType));
 
   return (!aFilter.IsNull() && aFilter->IsObjValid(theId));
 }
@@ -942,7 +941,10 @@ bool SMESHGUI_MultiEditDlg::onApply()
   bool aResult = process(aMeshEditor, anIds.inout());
   if (aResult) {
     if (myActor) {
-      mySelectionMgr->clearSelected();
+      SALOME_ListIO sel;
+      mySelectionMgr->selectedObjects( sel );
+      mySelector->ClearIndex();
+      mySelectionMgr->setSelectedObjects( sel );
       SMESH::UpdateView();
     }