From c6313b5a9ef8ed91c61e969bae57df046d3c012d Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 27 Aug 2015 18:57:20 +0300 Subject: [PATCH] Emit vpTransformationStarted(), vpTransformationFinished() signals on wheel event in OCC viewer --- src/OCCViewer/OCCViewer_ViewWindow.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 98ae2107b..5cacf379d 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -373,7 +373,9 @@ bool OCCViewer_ViewWindow::eventFilter( QObject* watched, QEvent* e ) ic->HilightPreviousDetected( myViewPort->getView() ); } } - } else { + } + else { + emit vpTransformationStarted ( ZOOMVIEW ); myViewPort->startZoomAtPoint( aEvent->x(), aEvent->y() ); double delta = (double)( aEvent->delta() ) / ( 15 * 8 ); int x = aEvent->x(); @@ -382,6 +384,7 @@ bool OCCViewer_ViewWindow::eventFilter( QObject* watched, QEvent* e ) int y1 = (int)( aEvent->y() + height()*delta/100 ); myViewPort->zoom( x, y, x1, y1 ); myViewPort->getView()->ZFitAll(); + emit vpTransformationFinished ( ZOOMVIEW ); } } return true; @@ -550,7 +553,7 @@ void OCCViewer_ViewWindow::vpMousePressEvent( QMouseEvent* theEvent ) } /* notify that we start a transformation */ if ( transformRequested() ) - emit vpTransformationStarted ( myOperation ); + emit vpTransformationStarted ( myOperation ); } if ( transformRequested() ) setTransformInProcess( true ); -- 2.39.2