diff options
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) |