Using mouse wheel to zoom in sometimes zooms out, fixes #5036
This commit is contained in:
parent
1bfe03418e
commit
ae4cfaa992
@ -275,6 +275,10 @@ void CropWindow::scroll (int state, GdkScrollDirection direction, int x, int y,
|
|||||||
} else {
|
} else {
|
||||||
delta = deltaY;
|
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);
|
bool isUp = direction == GDK_SCROLL_UP || (direction == GDK_SCROLL_SMOOTH && delta < 0.0);
|
||||||
if ((state & GDK_CONTROL_MASK) && onArea(ColorPicker, x, y)) {
|
if ((state & GDK_CONTROL_MASK) && onArea(ColorPicker, x, y)) {
|
||||||
// resizing a color picker
|
// resizing a color picker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user