X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_GroupOpDlg.cxx;h=3462495c88ff9bdfa2872b89450f848057b6ed9b;hb=15963fa362143c7a99ae91a6e6f2e10860160250;hp=8588a3c563b2c9208beed71bc45676552fed8d29;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx index 8588a3c56..3462495c8 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOpDlg.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 @@ -59,7 +59,6 @@ #include #include #include -#include #include #include @@ -204,7 +203,7 @@ QWidget* SMESHGUI_GroupOpDlg::createButtonFrame (QWidget* theParent) // connect signals and slots connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk())); - connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose())); + connect(myCloseBtn, SIGNAL(clicked()), SLOT(reject())); connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply())); connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp())); @@ -228,12 +227,12 @@ void SMESHGUI_GroupOpDlg::Init() // selection and SMESHGUI connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone())); connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate())); - connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(ClickOnClose())); + connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject())); // set selection mode if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(ActorSelection); - mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP)); + mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP)); } /*! @@ -315,14 +314,14 @@ void SMESHGUI_GroupOpDlg::onOk() { setIsApplyAndClose( true ); if ( onApply() ) - onClose(); + reject(); setIsApplyAndClose( false ); } /*! - \brief SLOT called when "Close" button pressed closes dialog + \brief SLOT called when dialog is closed */ -void SMESHGUI_GroupOpDlg::onClose() +void SMESHGUI_GroupOpDlg::reject() { if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(ActorSelection); @@ -331,7 +330,7 @@ void SMESHGUI_GroupOpDlg::onClose() mySMESHGUI->ResetState(); mySelectionMgr->clearFilters(); reset(); - reject(); + QDialog::reject(); } /*! @@ -464,15 +463,7 @@ void SMESHGUI_GroupOpDlg::enterEvent(QEvent*) setEnabled(true); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(ActorSelection); - mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP)); -} - -/*! - \brief Provides reaction on close event, closes the dialog box -*/ -void SMESHGUI_GroupOpDlg::closeEvent(QCloseEvent*) -{ - onClose(); + mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP)); } /*!