From: mkr Date: Tue, 20 May 2008 13:13:56 +0000 (+0000) Subject: Fix for NPAL19673 : GUI bug with clipping. X-Git-Tag: TG_ELNO_visualization_28May2008~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=acfaa6dafc7f5d081b5fe189e67bcf5bb0dc3eca;p=modules%2Fgui.git Fix for NPAL19673 : GUI bug with clipping. --- diff --git a/src/OCCViewer/OCCViewer_ClippingDlg.cxx b/src/OCCViewer/OCCViewer_ClippingDlg.cxx index 106e28b8f..606dd3ed4 100644 --- a/src/OCCViewer/OCCViewer_ClippingDlg.cxx +++ b/src/OCCViewer/OCCViewer_ClippingDlg.cxx @@ -247,8 +247,7 @@ void OCCViewer_ClippingDlg::closeEvent( QCloseEvent* e ) if ( !aView3d.IsNull() && !myClippingPlane.IsNull() ) aView3d->SetPlaneOn( myClippingPlane ); - if (!myView->isCuttingPlane()) - myAction->setOn( false ); + myAction->setOn( false ); QDialog::closeEvent( e ); } @@ -288,8 +287,7 @@ void OCCViewer_ClippingDlg::ClickOnClose() if ( !aView3d.IsNull() && !myClippingPlane.IsNull() ) aView3d->SetPlaneOn( myClippingPlane ); - if (!myView->isCuttingPlane()) - myAction->setOn( false ); + myAction->setOn( false ); reject(); } diff --git a/src/OCCViewer/OCCViewer_SetRotationPointDlg.cxx b/src/OCCViewer/OCCViewer_SetRotationPointDlg.cxx index 0aed2c230..c01136f98 100644 --- a/src/OCCViewer/OCCViewer_SetRotationPointDlg.cxx +++ b/src/OCCViewer/OCCViewer_SetRotationPointDlg.cxx @@ -276,3 +276,13 @@ OCCViewer_SetRotationPointDlg { hide(); } + +/*! + Custom handling of close event: toggle action +*/ +void +OCCViewer_SetRotationPointDlg::closeEvent( QCloseEvent* e ) +{ + myAction->setOn( false ); + QDialog::closeEvent( e ); +} diff --git a/src/OCCViewer/OCCViewer_SetRotationPointDlg.h b/src/OCCViewer/OCCViewer_SetRotationPointDlg.h index 18c1f654e..1da4e708c 100644 --- a/src/OCCViewer/OCCViewer_SetRotationPointDlg.h +++ b/src/OCCViewer/OCCViewer_SetRotationPointDlg.h @@ -77,6 +77,9 @@ protected slots: void onViewShow(); void onViewHide(); + +private: + virtual void closeEvent( QCloseEvent* e ); }; #endif // OCCVIEWER_SETROTATIONPOINTDLG_H