diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 45372f1f5..6eac5e59d 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -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