From 3963402ca5642760d86ffcd02d4357fb780daddd Mon Sep 17 00:00:00 2001 From: Michael Pfeiffer Date: Thu, 28 Dec 2006 18:49:01 +0000 Subject: [PATCH] Fixed selection handling bug if zoom level is not 1.0. Zoom factor has to be calculated in Setup() otherwise the selection rectangle uses the wrong zoom level. Bug was introduced in revision 19253. @Ryan: Can you please verify that this fix does not introduce another bug? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19648 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/showimage/ShowImageView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/apps/showimage/ShowImageView.cpp b/src/apps/showimage/ShowImageView.cpp index f0c2ac343c..6f87ebc33a 100644 --- a/src/apps/showimage/ShowImageView.cpp +++ b/src/apps/showimage/ShowImageView.cpp @@ -747,6 +747,7 @@ ShowImageView::Setup(BRect rect) { fLeft = floorf(rect.left); fTop = floorf(rect.top); + fZoom = (rect.Width()+1.0) / (fBitmap->Bounds().Width()+1.0); }