diff options
author | Martin Jones <martin.jones@nokia.com> | 2012-06-27 14:05:38 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-27 08:49:46 +0200 |
commit | 7722786a1305d9fdd4e0e8856322352c806de25c (patch) | |
tree | 99b9c3097b5e143112d7fb454ea1f3cc6b06b75c /src/quick/items/qquickpathview.cpp | |
parent | 9b527b0122abc68368574063af2175852cdcb328 (diff) |
Changing PathView offset doesn't set currentIndex appropriately
If the highlightRangeMode is StrictlyEnforceRange then the
currentIndex should always be updated when the path offset changes.
Task-number: QTBUG-19835
Change-Id: I2371e5abd430e770bbb8f9f9d5f4e1d17e0d8ff5
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'src/quick/items/qquickpathview.cpp')
-rw-r--r-- | src/quick/items/qquickpathview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index 1c3b9aaf46..e96e98856a 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -767,6 +767,7 @@ qreal QQuickPathView::offset() const void QQuickPathView::setOffset(qreal offset) { Q_D(QQuickPathView); + d->moveReason = QQuickPathViewPrivate::Other; d->setOffset(offset); d->updateCurrent(); } @@ -1562,6 +1563,7 @@ void QQuickPathView::componentComplete() d->regenerate(); } d->updateHighlight(); + d->updateCurrent(); if (d->modelCount) emit countChanged(); @@ -1866,7 +1868,7 @@ void QQuickPathViewPrivate::createCurrentItem() void QQuickPathViewPrivate::updateCurrent() { Q_Q(QQuickPathView); - if (moveReason != Mouse) + if (moveReason == SetIndex) return; if (!modelCount || !haveHighlightRange || highlightRangeMode != QQuickPathView::StrictlyEnforceRange) return; |