From 86da435331fd1cfc67e0d5c9ddcbbb67b1eb8ab2 Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 13 Feb 2007 11:47:25 +0000 Subject: [PATCH] NPAL14854: EDF 359 OCC: Zooming problem. Take into account direction of vertical mouse movement (like in VTK). --- src/OCCViewer/OCCViewer_ViewPort3d.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ); + } } /*! -- 2.39.2