diff options
Diffstat (limited to 'src/widgets/widgets/qabstractslider.cpp')
-rw-r--r-- | src/widgets/widgets/qabstractslider.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/widgets/qabstractslider.cpp b/src/widgets/widgets/qabstractslider.cpp index 3f6185b4e7..4221ff40ef 100644 --- a/src/widgets/widgets/qabstractslider.cpp +++ b/src/widgets/widgets/qabstractslider.cpp @@ -734,9 +734,10 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb 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) + const float effective_offset = invertedControls ? -offset_accumulated : offset_accumulated; + if (effective_offset > 0.f && value < maximum) return true; - if (offset_accumulated < 0.f && value > minimum) + if (effective_offset < 0.f && value > minimum) return true; offset_accumulated = 0; return false; |