summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-04-27 03:10:34 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-04-27 03:54:04 (GMT)
commit8878e2c53a0c9408d4b468e2dad485743c32f58b (patch)
treeb6bdd0c5a78e6f5f255b8b0d311b82d919cbc7ac /src/declarative
parent10830210607d08eeb2af5d091639506a7d8cc634 (diff)
downloadQt-8878e2c53a0c9408d4b468e2dad485743c32f58b.zip
Qt-8878e2c53a0c9408d4b468e2dad485743c32f58b.tar.gz
Qt-8878e2c53a0c9408d4b468e2dad485743c32f58b.tar.bz2
PathView offset out of sync with currentIndex when items are removed.
If the view is animating due to currentIndex change and items are removed the target offset must be recalculated. Change-Id: Iee105712488070c086a24561a49daf17bcf14076 Task-number: QTBUG-18825 Reviewed-by: Michael Brasser
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 778b8b9..aed849b 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -1525,6 +1525,8 @@ void QDeclarativePathView::itemsRemoved(int modelIndex, int count)
} else {
d->regenerate();
d->updateCurrent();
+ if (!d->flicking && !d->moving && d->haveHighlightRange && d->highlightRangeMode == QDeclarativePathView::StrictlyEnforceRange)
+ d->snapToCurrent();
}
if (changedOffset)
emit offsetChanged();