X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_RenumberingDlg.cxx;h=64f5c8d3fd647549e754e9d6afadb43bbd87b64a;hp=96d061cc6ef24874bbd0e903dac1a2352ac2f341;hb=b22e182dd1a2c30be324b21074158390d00714b3;hpb=1067ffa6e7e5c394e3a1b17219d8b355a57607cd diff --git a/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx b/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx index 96d061cc6..64f5c8d3f 100644 --- a/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 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 @@ -186,7 +186,7 @@ void SMESHGUI_RenumberingDlg::Init() /* 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())); @@ -194,7 +194,7 @@ void SMESHGUI_RenumberingDlg::Init() 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())); myEditCurrentArgument = LineEditMesh; LineEditMesh->setFocus(); @@ -254,20 +254,20 @@ void SMESHGUI_RenumberingDlg::ClickOnApply() void SMESHGUI_RenumberingDlg::ClickOnOk() { ClickOnApply(); - ClickOnCancel(); + reject(); } //================================================================================= -// function : ClickOnCancel() +// function : reject() // purpose : //================================================================================= -void SMESHGUI_RenumberingDlg::ClickOnCancel() +void SMESHGUI_RenumberingDlg::reject() { //mySelectionMgr->clearSelected(); mySelectionMgr->clearFilters(); disconnect(mySelectionMgr, 0, this, 0); mySMESHGUI->ResetState(); - reject(); + QDialog::reject(); } //================================================================================= @@ -392,26 +392,6 @@ void SMESHGUI_RenumberingDlg::enterEvent(QEvent* e) ActivateThisDialog(); } -//================================================================================= -// function : closeEvent() -// purpose : -//================================================================================= -void SMESHGUI_RenumberingDlg::closeEvent(QCloseEvent* e) -{ - /* same than click on cancel button */ - ClickOnCancel(); -} - -//======================================================================= -//function : hideEvent -//purpose : caused by ESC key -//======================================================================= -void SMESHGUI_RenumberingDlg::hideEvent (QHideEvent * e) -{ - if (!isMinimized()) - ClickOnCancel(); -} - //================================================================================= // function : keyPressEvent() // purpose :