summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-09 00:52:44 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-09 00:52:44 +0300
commitb2c430f8e0fd67c6529227f8e8bebdc407ef530d (patch)
tree8f039e50061c9fb7ea6985d55f62b8523c0a0fe7 /src
parent4f948c82ea95c6b9fac307f455fe91851e27017a (diff)
downloadmanaverse-b2c430f8e0fd67c6529227f8e8bebdc407ef530d.tar.gz
manaverse-b2c430f8e0fd67c6529227f8e8bebdc407ef530d.tar.bz2
manaverse-b2c430f8e0fd67c6529227f8e8bebdc407ef530d.tar.xz
manaverse-b2c430f8e0fd67c6529227f8e8bebdc407ef530d.zip
do not allow at same time scroll by mouse in vertical and horizontal directions.
Diffstat (limited to 'src')
-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)