From 5d2981f3fd675d940bdf8bac0135cd66947e8684 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 14 Oct 2005 13:05:32 +0000 Subject: [PATCH] Fixed bug GVIEW10296 : Segmentation cursor are operable after closing of corresponding dialog box --- src/VVTK/VVTK_PickingDlg.cxx | 4 ++-- src/VVTK/VVTK_PickingDlg.h | 5 ++--- src/VVTK/VVTK_SegmentationCursorDlg.cxx | 4 ++-- src/VVTK/VVTK_SegmentationCursorDlg.h | 7 +++---- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/VVTK/VVTK_PickingDlg.cxx b/src/VVTK/VVTK_PickingDlg.cxx index 5ff46c77..9a8ed193 100644 --- a/src/VVTK/VVTK_PickingDlg.cxx +++ b/src/VVTK/VVTK_PickingDlg.cxx @@ -232,11 +232,11 @@ void VVTK_PickingDlg::onClickApply() void VVTK_PickingDlg::onClickClose() { myAction->setOn( false ); - reject(); } -void VVTK_PickingDlg::closeEvent( QCloseEvent* ) +void VVTK_PickingDlg::done( int r ) { myAction->setOn( false ); + QDialog::done( r ); } diff --git a/src/VVTK/VVTK_PickingDlg.h b/src/VVTK/VVTK_PickingDlg.h index 767dc3c7..17ff30f3 100644 --- a/src/VVTK/VVTK_PickingDlg.h +++ b/src/VVTK/VVTK_PickingDlg.h @@ -47,10 +47,9 @@ public: VISU_PickingSettings* GetPickingSettings(); -protected: - virtual void closeEvent( QCloseEvent* ); +protected slots: + virtual void done( int ); -private slots: void onClickApply(); void onClickClose(); diff --git a/src/VVTK/VVTK_SegmentationCursorDlg.cxx b/src/VVTK/VVTK_SegmentationCursorDlg.cxx index 39e7869e..4e20b11b 100644 --- a/src/VVTK/VVTK_SegmentationCursorDlg.cxx +++ b/src/VVTK/VVTK_SegmentationCursorDlg.cxx @@ -534,11 +534,11 @@ void VVTK_SegmentationCursorDlg::ApplyOutsideCursor() void VVTK_SegmentationCursorDlg::onClickClose() { myAction->setOn( false ); - reject(); } -void VVTK_SegmentationCursorDlg::closeEvent( QCloseEvent* ) +void VVTK_SegmentationCursorDlg::done( int r ) { myAction->setOn( false ); + QDialog::done( r ); } diff --git a/src/VVTK/VVTK_SegmentationCursorDlg.h b/src/VVTK/VVTK_SegmentationCursorDlg.h index 270ef2fc..1e63fcad 100644 --- a/src/VVTK/VVTK_SegmentationCursorDlg.h +++ b/src/VVTK/VVTK_SegmentationCursorDlg.h @@ -61,16 +61,15 @@ protected: vtkImageData* MakeImageData( const QString& theMainTexture, const QString& theAlphaTexture ); -protected: - virtual void closeEvent( QCloseEvent* ); - private: static void ProcessEvents(vtkObject* theObject, unsigned long theEvent, void* theClientData, void* theCallData); -private slots: +protected slots: + virtual void done( int ); + void onClickApply(); void onClickClose(); -- 2.39.2