Fix scrolling in wrong direction when using mouse wheel in filebrowser, #5036
This commit is contained in:
parent
6ba989ef1c
commit
d06e26356b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user