diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-09 00:52:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-09 00:52:44 +0300 |
commit | b2c430f8e0fd67c6529227f8e8bebdc407ef530d (patch) | |
tree | 8f039e50061c9fb7ea6985d55f62b8523c0a0fe7 /src/gui | |
parent | 4f948c82ea95c6b9fac307f455fe91851e27017a (diff) | |
download | mv-b2c430f8e0fd67c6529227f8e8bebdc407ef530d.tar.gz mv-b2c430f8e0fd67c6529227f8e8bebdc407ef530d.tar.bz2 mv-b2c430f8e0fd67c6529227f8e8bebdc407ef530d.tar.xz mv-b2c430f8e0fd67c6529227f8e8bebdc407ef530d.zip |
do not allow at same time scroll by mouse in vertical and horizontal directions.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 4 |
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) |