diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index fdb551f45..5f75967e6 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -76,6 +76,10 @@ void ThumbBrowserBase::scroll (int direction, double deltaX, double deltaY) } else { delta = deltaY; } + if (direction == GDK_SCROLL_SMOOTH && delta == 0.0) { + // sometimes this case happens. To avoid scrolling the wrong direction in this case, we just do nothing + return; + } double coef = direction == GDK_SCROLL_DOWN || (direction == GDK_SCROLL_SMOOTH && delta > 0.0) ? +1.0 : -1.0; // GUI already acquired when here