From 090b0978f3546a10784992c3e4b1eb40427e0353 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 14 Jun 2018 21:57:29 -0500 Subject: StrictlyEnforceRange should not override valid SnapOne decisions The changes made in 134d980a7fcf61c5440019bcfb3fdfc39c3f5f3c and 2b779fbd25aaf09897ee2cdc4edffd12a980420b were still a bit too broad. Tighten the condition further so original behavior is restored for smaller to medium drags. Change-Id: I9006e9cea80c1ef79e0b8d6a47b2a497532bef57 Reviewed-by: Mitch Curtis --- tests/auto/quick/qquickgridview/tst_qquickgridview.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto/quick/qquickgridview') diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp index 3643374c8f..7deed8c5a8 100644 --- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp +++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp @@ -4411,6 +4411,10 @@ void tst_QQuickGridView::snapOneRow_data() // Ensure this further movement has the same behavior QTest::newRow("vertical, left to right, no more blindspot") << QQuickGridView::FlowLeftToRight << Qt::LeftToRight << int(QQuickItemView::NoHighlightRange) << QPoint(20, 160) << QPoint(20, 95) << 100.0 << 240.0 << 0.0 << 4.0; + + // StrictlyEnforceRange should not override valid SnapOneItem decisions + QTest::newRow("vertical, left to right, no more blindspot, enforce range") << QQuickGridView::FlowLeftToRight << Qt::LeftToRight << int(QQuickItemView::StrictlyEnforceRange) + << QPoint(20, 160) << QPoint(20, 95) << 100.0 << 340.0 << -20.0 << 4.0; } void tst_QQuickGridView::snapOneRow() -- cgit v1.2.3