From aff3a03b57eb1182e1698fef6e7222919ea74213 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 4 May 2017 16:24:47 +0200 Subject: [PATCH] Fixed handling of pipettes with the extended zoom levels Fixes #3861 --- rtgui/cropwindow.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 0694f68ea..5c5a318c4 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -2214,6 +2214,10 @@ void CropWindow::screenCoordToCropBuffer (int phyx, int phyy, int& cropx, int& c if (zoomSteps[cropZoom].zoom > 1.) { cropx = int(double(cropx) / zoomSteps[cropZoom].zoom); cropy = int(double(cropy) / zoomSteps[cropZoom].zoom); + } else { + float czoom = float((zoomSteps[cropZoom].czoom/10) * 10) / float(zoomSteps[cropZoom].czoom); + cropx = cropx / czoom; + cropy = cropy / czoom; } cropx += crop->getLeftBorder();