Fix bug in calculation of diagonal, #5032, thanks to @Konyicsiva

This commit is contained in:
heckflosse 2018-11-28 16:28:43 +01:00
parent 79d561469f
commit b5a20fd6df

View File

@ -1964,7 +1964,7 @@ void CropWindow::zoomIn (bool toCursor, int cursorX, int cursorY)
int x1 = cropHandler.cropParams.x + cropHandler.cropParams.w / 2;
int y1 = cropHandler.cropParams.y + cropHandler.cropParams.h / 2;
double cropd = sqrt(cropHandler.cropParams.h * cropHandler.cropParams.h + cropHandler.cropParams.w * cropHandler.cropParams.w) * zoomSteps[cropZoom].zoom;
double imd = sqrt(imgW * imgW + imgH + imgH);
double imd = sqrt(imgW * imgW + imgH * imgH);
double d;
// the more we can see of the crop, the more gravity towards crop center