Salome HOME
PR: synchro V7_main tag mergefrom_V6_main_28Feb13
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SmoothingDlg.cxx
index 61aaae845cf012b2524d7ca67dc37706f5ded7f9..e31d5c79b8df7ede974e9454e57bdcf003ad439b 100644 (file)
@@ -275,7 +275,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
   /***************************************************************/
   // signals and slots connections
   connect(buttonOk, SIGNAL(clicked()),     this, SLOT(ClickOnOk()));
-  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
   connect(buttonApply, SIGNAL(clicked()),  this, SLOT(ClickOnApply()));
   connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
 
@@ -284,7 +284,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
   connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
   /* to close dialog if study change */
-  connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+  connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
   connect(LineEditElements, SIGNAL(textChanged(const QString&)),
            SLOT(onTextChange(const QString&)));
   connect(LineEditNodes, SIGNAL(textChanged(const QString&)),
@@ -421,14 +421,14 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply()
 void SMESHGUI_SmoothingDlg::ClickOnOk()
 {
   if( ClickOnApply() )
-    ClickOnCancel();
+    reject();
 }
 
 //=================================================================================
-// function : ClickOnCancel()
+// function : reject()
 // purpose  : Called when dialog box is closed
 //=================================================================================
-void SMESHGUI_SmoothingDlg::ClickOnCancel()
+void SMESHGUI_SmoothingDlg::reject()
 {
   disconnect(mySelectionMgr, 0, this, 0);
   mySelectionMgr->clearFilters();
@@ -441,7 +441,7 @@ void SMESHGUI_SmoothingDlg::ClickOnCancel()
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
     aViewWindow->SetSelectionMode(ActorSelection);
   mySMESHGUI->ResetState();
-  reject();
+  QDialog::reject();
 }
 
 //=================================================================================
@@ -704,26 +704,6 @@ void SMESHGUI_SmoothingDlg::enterEvent (QEvent*)
     ActivateThisDialog();
 }
 
-//=================================================================================
-// function : closeEvent()
-// purpose  :
-//=================================================================================
-void SMESHGUI_SmoothingDlg::closeEvent (QCloseEvent*)
-{
-  /* same than click on cancel button */
-  ClickOnCancel();
-}
-
-//=======================================================================
-// function : hideEvent()
-// purpose  : caused by ESC key
-//=======================================================================
-void SMESHGUI_SmoothingDlg::hideEvent (QHideEvent*)
-{
-  if (!isMinimized())
-    ClickOnCancel();
-}
-
 //=======================================================================
 // function : onSelectMesh()
 // purpose  :