Using mouse wheel to zoom in sometimes zooms out, fixes #5036

This commit is contained in:
heckflosse 2018-11-26 21:00:48 +01:00
parent 1bfe03418e
commit ae4cfaa992

View File

@ -275,6 +275,10 @@ void CropWindow::scroll (int state, GdkScrollDirection direction, int x, int y,
} else {
delta = deltaY;
}
if (delta == 0.0 && direction == GDK_SCROLL_SMOOTH) {
// sometimes this case happens. To avoid zooming into the wrong direction in this case, we just do nothing
return;
}
bool isUp = direction == GDK_SCROLL_UP || (direction == GDK_SCROLL_SMOOTH && delta < 0.0);
if ((state & GDK_CONTROL_MASK) && onArea(ColorPicker, x, y)) {
// resizing a color picker