summaryrefslogtreecommitdiff
path: root/src/gui/widgets/scrollarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r--src/gui/widgets/scrollarea.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index bcd1af169..e40b1ce18 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -744,7 +744,7 @@ void ScrollArea::mouseReleased(gcn::MouseEvent& event)
if ((dy < 20 && dy > 0) || (dy > -20 && dy < 0))
dy = 0;
- if (dx)
+ if (abs(dx) > abs(dy))
{
int s = mHScroll + dx;
if (s < 0)
@@ -760,7 +760,7 @@ void ScrollArea::mouseReleased(gcn::MouseEvent& event)
setHorizontalScrollAmount(s);
}
- if (dy)
+ else if (dy)
{
int s = mVScroll + dy;
if (s < 0)