Salome HOME
Dialogs were divided to "operation and dialog"
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Operation.cxx
index 256a7aee8e4eb6ee8d44a6e9986207badc1e94f7..9a98634f1625374eedfdd153e1c13d8964a67c1d 100755 (executable)
@@ -40,9 +40,25 @@ SMESHGUI_Operation::SMESHGUI_Operation()
 {
 }
 
+//=======================================================================
+// name    : ~SMESHGUI_Operation
+// Purpose : Destructor
+//=======================================================================
 SMESHGUI_Operation::~SMESHGUI_Operation()
 {
-  
+}
+
+//=======================================================================
+// name    : selectionMode
+// Purpose : Returns selection mode
+//=======================================================================
+Selection_Mode SMESHGUI_Operation::selectionMode() const
+{
+  SVTK_ViewWindow* wnd = viewWindow();
+  if( wnd )
+    return wnd->SelectionMode();
+  else
+    return ActorSelection;
 }
 
 //=======================================================================
@@ -129,7 +145,9 @@ void SMESHGUI_Operation::startOperation()
       
     if( dlg()->testButtonFlags( QtxDialog::Cancel ) )
       connect( dlg(), SIGNAL( dlgCancel() ), this, SLOT( onCancel() ) );
-  }    
+
+    initDialog();
+  }
 
   SalomeApp_Operation::startOperation();
 }
@@ -332,21 +350,9 @@ void SMESHGUI_Operation::onCancel()
 }
 
 //=======================================================================
-// name    : commitOperation
-// Purpose :
-//=======================================================================
-void SMESHGUI_Operation::commitOperation()
-{
-  selectionMgr()->clearFilters();
-  SalomeApp_Operation::commitOperation();
-}
-
-//=======================================================================
-// name    : abortOperation
+// name    : initDialog
 // Purpose :
 //=======================================================================
-void SMESHGUI_Operation::abortOperation()
+void SMESHGUI_Operation::initDialog()
 {
-  selectionMgr()->clearFilters();
-  SalomeApp_Operation::abortOperation();
 }