aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickslider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquickslider.cpp')
-rw-r--r--src/quicktemplates2/qquickslider.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/quicktemplates2/qquickslider.cpp b/src/quicktemplates2/qquickslider.cpp
index e792b6a5..d54a47e5 100644
--- a/src/quicktemplates2/qquickslider.cpp
+++ b/src/quicktemplates2/qquickslider.cpp
@@ -530,17 +530,15 @@ void QQuickSlider::mouseReleaseEvent(QMouseEvent *event)
Q_D(QQuickSlider);
QQuickControl::mouseReleaseEvent(event);
d->pressPoint = QPoint();
- if (keepMouseGrab()) {
- qreal pos = d->positionAt(event->pos());
- if (d->snapMode != NoSnap)
- pos = d->snapPosition(pos);
- qreal val = valueAt(pos);
- if (!qFuzzyCompare(val, d->value))
- setValue(val);
- else if (d->snapMode != NoSnap)
- d->setPosition(pos);
- setKeepMouseGrab(false);
- }
+ qreal pos = d->positionAt(event->pos());
+ if (d->snapMode != NoSnap)
+ pos = d->snapPosition(pos);
+ qreal val = valueAt(pos);
+ if (!qFuzzyCompare(val, d->value))
+ setValue(val);
+ else if (d->snapMode != NoSnap)
+ d->setPosition(pos);
+ setKeepMouseGrab(false);
setPressed(false);
}