]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
NPAL14854: EDF 359 OCC: Zooming problem. Take into account direction of vertical...
authorjfa <jfa@opencascade.com>
Tue, 13 Feb 2007 11:47:25 +0000 (11:47 +0000)
committerjfa <jfa@opencascade.com>
Tue, 13 Feb 2007 11:47:25 +0000 (11:47 +0000)
src/OCCViewer/OCCViewer_ViewPort3d.cxx

index 1a83b55ea8e1be1a08c0a46ee11e6e5caf99a7cf..cbeb3ce9c3a61f9b6a084eeeeaa455c9d9f20a83 100755 (executable)
@@ -296,8 +296,12 @@ void OCCViewer_ViewPort3d::fitRect( const QRect& rect )
 */
 void OCCViewer_ViewPort3d::zoom( int x0, int y0, int x, int y )
 {
-       if ( !activeView().IsNull() )
-           activeView()->Zoom( x0, y0, x, y );
+  if ( !activeView().IsNull() ) {
+    // as OCCT respects a sign of only dx,
+    // but we want both signes to be taken into account
+    //activeView()->Zoom( x0, y0, x, y );
+    activeView()->Zoom( x0 + y0, 0, x + y, 0 );
+  }
 }
 
 /*!