From b9d0a7e1976cf995e88d33fba35203858d0b19e1 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 19203799f..de19ce981 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -385,7 +385,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(); @@ -394,6 +396,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; @@ -562,7 +565,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