X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_SmoothingDlg.cxx;h=7e1d8d0518e25e811f203d7e1b94cb8f7d709b85;hp=61aaae845cf012b2524d7ca67dc37706f5ded7f9;hb=4c65637b3ba0be986e1ce6e952689b2686475b2f;hpb=1067ffa6e7e5c394e3a1b17219d8b355a57607cd diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx index 61aaae845..7e1d8d051 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -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(); } //================================================================================= @@ -565,7 +565,7 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument() // get selected mesh SALOME_ListIO aList; - mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type()); + mySelectionMgr->selectedObjects(aList); int nbSel = aList.Extent(); if (nbSel != 1) return; @@ -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 :