diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-07 10:47:20 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-07 10:47:20 +0200 |
commit | ee0951d69b38f766e67262487be95b88501aa4a5 (patch) | |
tree | 116c334060500be340d4d61c99026316b0df3ce9 /src/widgets/widgets/qabstractslider.cpp | |
parent | 0bb645b1ccc5a9d57b21cf0b2c4306b8e48c611c (diff) | |
parent | d37239aa419ee4adff4b0a8d5c1403cadff72319 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/network/access/qftp.cpp
src/widgets/itemviews/qheaderview.cpp
src/widgets/itemviews/qlistview.cpp
tests/auto/network/access/qftp/tst_qftp.cpp
Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
Diffstat (limited to 'src/widgets/widgets/qabstractslider.cpp')
-rw-r--r-- | src/widgets/widgets/qabstractslider.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/widgets/widgets/qabstractslider.cpp b/src/widgets/widgets/qabstractslider.cpp index 8cd35495e9..3f6185b4e7 100644 --- a/src/widgets/widgets/qabstractslider.cpp +++ b/src/widgets/widgets/qabstractslider.cpp @@ -731,8 +731,16 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb stepsToScroll = int(offset_accumulated); #endif offset_accumulated -= int(offset_accumulated); - if (stepsToScroll == 0) + if (stepsToScroll == 0) { + // We moved less than a line, but might still have accumulated partial scroll, + // unless we already are at one of the ends. + if (offset_accumulated > 0.f && value < maximum) + return true; + if (offset_accumulated < 0.f && value > minimum) + return true; + offset_accumulated = 0; return false; + } } if (invertedControls) |