From d01446bfb056bfa2e80310b1dfd8637dcaa4bb7e Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 18 Apr 2014 11:48:36 +0400 Subject: [PATCH] Fix for the "0052369: TC7.4.0: Visualization problem of default torus preview". --- src/OCCViewer/OCCViewer_ViewWindow.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index ec18d2892..96e15b488 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -371,6 +371,7 @@ bool OCCViewer_ViewWindow::eventFilter( QObject* watched, QEvent* e ) int x1 = (int)( aEvent->x() + width()*delta/100 ); int y1 = (int)( aEvent->y() + height()*delta/100 ); myViewPort->zoom( x, y, x1, y1 ); + myViewPort->getView()->ZFitAll(); } return true; @@ -1001,6 +1002,7 @@ void OCCViewer_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent) case PANVIEW: case ZOOMVIEW: + myViewPort->getView()->ZFitAll(); resetState(); break; -- 2.39.2