From: jfa Date: Tue, 13 Feb 2007 11:47:25 +0000 (+0000) Subject: NPAL14854: EDF 359 OCC: Zooming problem. Take into account direction of vertical... X-Git-Tag: V3_2_6a1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=86da435331fd1cfc67e0d5c9ddcbbb67b1eb8ab2;p=modules%2Fgui.git NPAL14854: EDF 359 OCC: Zooming problem. Take into account direction of vertical mouse movement (like in VTK). --- diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index 1a83b55ea..cbeb3ce9c 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -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 ); + } } /*!