diff options
Diffstat (limited to 'src/gui/widgets/qslider.cpp')
-rw-r--r-- | src/gui/widgets/qslider.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/gui/widgets/qslider.cpp b/src/gui/widgets/qslider.cpp index 4d582b3..d9c98e1 100644 --- a/src/gui/widgets/qslider.cpp +++ b/src/gui/widgets/qslider.cpp @@ -62,7 +62,6 @@ public: int tickInterval; QSlider::TickPosition tickPosition; int clickOffset; - int snapBackPosition; void init(); void resetLayoutItemMargins(); int pixelPosToRangeValue(int pos) const; @@ -204,7 +203,7 @@ QStyle::SubControl QSliderPrivate::newHoverControl(const QPoint &pos) \brief The QSlider widget provides a vertical or horizontal slider. \ingroup basicwidgets - \mainclass + The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal or vertical @@ -493,7 +492,6 @@ void QSlider::mousePressEvent(QMouseEvent *ev) setRepeatAction(SliderNoAction); QRect sr = style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderHandle, this); d->clickOffset = d->pick(ev->pos() - sr.topLeft()); - d->snapBackPosition = d->position; update(sr); setSliderDown(true); } @@ -513,14 +511,6 @@ void QSlider::mouseMoveEvent(QMouseEvent *ev) int newPosition = d->pixelPosToRangeValue(d->pick(ev->pos()) - d->clickOffset); QStyleOptionSlider opt; initStyleOption(&opt); - int m = style()->pixelMetric(QStyle::PM_MaximumDragDistance, &opt, this); - if (m >= 0) { - QRect r = rect(); - r.adjust(-m, -m, m, m); - if (!r.contains(ev->pos())) { - newPosition = d->snapBackPosition; - } - } setSliderPosition(newPosition); } |