From d7e62792924dc48d95c28bf5ff15dc87c132e821 Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 5 Oct 2005 06:44:27 +0000 Subject: [PATCH] To handle close event --- src/SVTK/SVTK_CubeAxesDlg.cxx | 5 +++++ src/SVTK/SVTK_CubeAxesDlg.h | 3 +++ src/SVTK/SVTK_NonIsometricDlg.cxx | 7 +++++++ src/SVTK/SVTK_NonIsometricDlg.h | 2 ++ 4 files changed, 17 insertions(+) diff --git a/src/SVTK/SVTK_CubeAxesDlg.cxx b/src/SVTK/SVTK_CubeAxesDlg.cxx index 72552c6ba..ea959790e 100644 --- a/src/SVTK/SVTK_CubeAxesDlg.cxx +++ b/src/SVTK/SVTK_CubeAxesDlg.cxx @@ -564,3 +564,8 @@ void SVTK_CubeAxesDlg::onClose() myAction->setOn( false ); } + +void SVTK_CubeAxesDlg::closeEvent( QCloseEvent* ) +{ + myAction->setOn( false ); +} diff --git a/src/SVTK/SVTK_CubeAxesDlg.h b/src/SVTK/SVTK_CubeAxesDlg.h index dc089f603..dc838217b 100644 --- a/src/SVTK/SVTK_CubeAxesDlg.h +++ b/src/SVTK/SVTK_CubeAxesDlg.h @@ -63,6 +63,9 @@ public: void Update(); +protected: + virtual void closeEvent( QCloseEvent* ); + private slots: void onOk(); bool onApply(); diff --git a/src/SVTK/SVTK_NonIsometricDlg.cxx b/src/SVTK/SVTK_NonIsometricDlg.cxx index e035387e5..82c91d45f 100644 --- a/src/SVTK/SVTK_NonIsometricDlg.cxx +++ b/src/SVTK/SVTK_NonIsometricDlg.cxx @@ -192,3 +192,10 @@ SVTK_NonIsometricDlg m_Action->setOn( false ); } + +void +SVTK_NonIsometricDlg +::closeEvent( QCloseEvent* ) +{ + m_Action->setOn( false ); +} diff --git a/src/SVTK/SVTK_NonIsometricDlg.h b/src/SVTK/SVTK_NonIsometricDlg.h index 4662f6b92..1b1105ec2 100644 --- a/src/SVTK/SVTK_NonIsometricDlg.h +++ b/src/SVTK/SVTK_NonIsometricDlg.h @@ -53,6 +53,8 @@ public: void Update(); protected: + virtual void closeEvent( QCloseEvent* ); + SVTK_MainWindow *m_MainWindow; QtxAction* m_Action; -- 2.39.2