aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2020-09-18 13:05:56 +0200
committerAndy Shaw <andy.shaw@qt.io>2020-09-18 13:57:05 +0200
commitd3cc8710bc6175e5e7562ba171bd32dfc4d224b7 (patch)
tree3e95228fd195bb2b5de427920178b1e8b6cb2af5 /src/quicktemplates2
parent5333bae0b6ca34884b8bd54da38ea473c235cc93 (diff)
Don't trigger a close due to a release if we did not get a press
If the drawer does not see the press point then it was not open at the time it was pressed. This ensures that when a touch is done on a button to trigger the opening of a drawer it does not think it should be closed due to the default close policy. Pick-to: 5.15 Change-Id: I0d1b11341e659dc14554d0d72aac70199bbb99fa Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r--src/quicktemplates2/qquickdrawer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp
index 47b69161..d264cf33 100644
--- a/src/quicktemplates2/qquickdrawer.cpp
+++ b/src/quicktemplates2/qquickdrawer.cpp
@@ -482,6 +482,8 @@ bool QQuickDrawerPrivate::handleMove(QQuickItem *item, const QPointF &point, ulo
bool QQuickDrawerPrivate::handleRelease(QQuickItem *item, const QPointF &point, ulong timestamp)
{
+ if (pressPoint.isNull())
+ return false;
if (!popupItem->keepMouseGrab() && !popupItem->keepTouchGrab()) {
velocityCalculator.reset();
return QQuickPopupPrivate::handleRelease(item, point, timestamp);