From b2c430f8e0fd67c6529227f8e8bebdc407ef530d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 9 Oct 2013 00:52:44 +0300 Subject: do not allow at same time scroll by mouse in vertical and horizontal directions. --- src/gui/widgets/scrollarea.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/scrollarea.cpp') 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) -- cgit v1.2.3-60-g2f50