From f9afc1b308740803d10342aa4976e709d52e41db Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 21 Dec 2005 07:57:36 +0000 Subject: [PATCH] Fixed bug GVIEW10903 : ?8 signal detected? has been appeared during attempt to use ?Fit Area? with ?Spherical Cursor? --- src/SVTK/SVTK_InteractorStyle.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 8e1a1a8e7..443cb440f 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -753,8 +753,8 @@ SVTK_InteractorStyle TranslateView(oldX, oldY, x, y); // zoom camera - double dxf = (double)(aSize[0]) / (double)(abs(right - left)); - double dyf = (double)(aSize[1]) / (double)(abs(bottom - top)); + double dxf = right == left ? 1.0 : (double)(aSize[0]) / (double)(abs(right - left)); + double dyf = bottom == top ? 1.0 : (double)(aSize[1]) / (double)(abs(bottom - top)); double zoomFactor = (dxf + dyf)/2 ; vtkCamera *aCam = GetCurrentRenderer()->GetActiveCamera(); -- 2.39.2