-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013 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
aLay->addWidget( myHelpBtn );
connect( myOkBtn, SIGNAL( clicked() ), this, SLOT( onOk() ) );
- connect( myCloseBtn, SIGNAL( clicked() ), this, SLOT( onClose() ) );
+ connect( myCloseBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( mySaveBtn, SIGNAL( clicked() ), this, SLOT( onSave() ) );
connect( myHelpBtn, SIGNAL( clicked() ), this, SLOT( onHelp() ) );
connect( mySMESHGUI, SIGNAL( SignalDeactivateActiveDialog() ),
this, SLOT( onDeactivate() ) );
connect( mySMESHGUI, SIGNAL( SignalCloseAllDialogs() ),
- this, SLOT( onClose() ) );
+ this, SLOT( reject() ) );
mySwitch2d->setEnabled( theType == Type_2d );
mySwitch3d->setEnabled( theType == Type_3d );
}
//=======================================================================
-// function : onClose()
+// function : reject()
// purpose : SLOT called when "Close" button pressed. Close dialog
//=======================================================================
-void SMESHGUI_CreatePatternDlg::onClose()
+void SMESHGUI_CreatePatternDlg::reject()
{
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
aViewWindow->SetSelectionMode( ActorSelection );
disconnect( mySelectionMgr, 0, this, 0 );
disconnect( mySMESHGUI, 0, this, 0 );
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
emit Close();
}
}
}
-//=================================================================================
-// function : closeEvent()
-// purpose : Close dialog box
-//=================================================================================
-void SMESHGUI_CreatePatternDlg::closeEvent( QCloseEvent* )
-{
- onClose();
-}
-
//=======================================================================
// function : onSelBtnClicked()
// purpose : SLOT. Called when -> button clicked.