]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Emit vpTransformationStarted(), vpTransformationFinished() signals on wheel event...
authorvsr <vsr@opencascade.com>
Thu, 27 Aug 2015 15:57:20 +0000 (18:57 +0300)
committerdbv <dbv@opencascade.com>
Thu, 10 Sep 2015 09:34:40 +0000 (12:34 +0300)
src/OCCViewer/OCCViewer_ViewWindow.cxx

index 98ae2107b3d762f9126aefb8a6cfdf96aaf6061a..5cacf379d25b2aabfad7065ded2cbcb4a65385cb 100755 (executable)
@@ -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 );