From b746d8b4e2e08866c59bee7770691e37f8bd3650 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 26 Jun 2009 12:25:17 +0000 Subject: [PATCH] Additional fix for issue 19928 --- src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx | 37 ++++++++++++++++++-------- src/SMESHGUI/SMESHGUI_ExtrusionDlg.h | 3 +++ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx index 16df272a4..2ed912383 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx @@ -591,17 +591,6 @@ void SMESHGUI_ExtrusionDlg::ClickOnOk() //================================================================================= void SMESHGUI_ExtrusionDlg::ClickOnCancel() { - disconnect(mySelectionMgr, 0, this, 0); - mySelectionMgr->clearFilters(); - //mySelectionMgr->clearSelected(); - if (SMESH::GetCurrentVtkView()) { - SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters - SMESH::SetPointRepresentation(false); - SMESH::SetPickable(); - } - if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) - aViewWindow->SetSelectionMode(ActorSelection); - mySMESHGUI->ResetState(); reject(); } @@ -883,6 +872,32 @@ void SMESHGUI_ExtrusionDlg::enterEvent (QEvent*) ActivateThisDialog(); } +//================================================================================= +// function : closeEvent() +// purpose : +//================================================================================= +void SMESHGUI_ExtrusionDlg::closeEvent( QCloseEvent* ) +{ + /* same than click on cancel button */ + disconnect(mySelectionMgr, 0, this, 0); + mySelectionMgr->clearFilters(); + //mySelectionMgr->clearSelected(); + if (SMESH::GetCurrentVtkView()) { + SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters + SMESH::SetPointRepresentation(false); + SMESH::SetPickable(); + } + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(ActorSelection); + mySMESHGUI->ResetState(); +} + +void SMESHGUI_ExtrusionDlg::reject() +{ + QDialog::reject(); + close(); +} + //================================================================================= // function : onSelectMesh() // purpose : diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h index 5b18830dc..4425d29f7 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h @@ -69,9 +69,12 @@ public: SMESHGUI_ExtrusionDlg( SMESHGUI* ); ~SMESHGUI_ExtrusionDlg(); + void reject(); + private: void Init( bool = true ); void enterEvent( QEvent* ); /* mouse enter the QWidget */ + void closeEvent( QCloseEvent* ); void keyPressEvent( QKeyEvent* ); int GetConstructorId(); -- 2.30.2