use std::fabs, hopefully fixes #5651
This commit is contained in:
parent
562b19bb5c
commit
30317f4133
@ -295,7 +295,7 @@ void CropWindow::flawnOver (bool isFlawnOver)
|
||||
void CropWindow::scroll (int state, GdkScrollDirection direction, int x, int y, double deltaX, double deltaY)
|
||||
{
|
||||
double delta = 0.0;
|
||||
if (abs(deltaX) > abs(deltaY)) {
|
||||
if (std::fabs(deltaX) > std::fabs(deltaY)) {
|
||||
delta = deltaX;
|
||||
} else {
|
||||
delta = deltaY;
|
||||
@ -304,7 +304,7 @@ void CropWindow::scroll (int state, GdkScrollDirection direction, int x, int y,
|
||||
if (direction == GDK_SCROLL_SMOOTH) {
|
||||
scrollAccum += delta;
|
||||
//Only change zoom level if we've accumulated +/- 1.0 of deltas. This conditional handles the previous delta=0.0 case
|
||||
if (abs(scrollAccum) < 1.0) {
|
||||
if (std::fabs(scrollAccum) < 1.0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user