summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-08-05 15:20:28 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-08-05 15:20:28 (GMT)
commit909c084d0c275ec5e747f395b7e0cd39a1d052bc (patch)
treed9e9f9e99dba572471c14ec00b16f4eba07c9dac /src/declarative/graphicsitems
parentcb086eb5340c4c41efaf45373aa05c37e8aa974a (diff)
parent05bb249c2ad3ee15eb205a806f8546c105683096 (diff)
downloadQt-909c084d0c275ec5e747f395b7e0cd39a1d052bc.zip
Qt-909c084d0c275ec5e747f395b7e0cd39a1d052bc.tar.gz
Qt-909c084d0c275ec5e747f395b7e0cd39a1d052bc.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 82b3e1c..e1dd1c0 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1021,7 +1021,7 @@ void QDeclarativeListViewPrivate::updateCurrent(int modelIndex)
if (oldCurrentItem && (!currentItem || oldCurrentItem->item != currentItem->item))
oldCurrentItem->attached->setIsCurrentItem(false);
if (currentItem) {
- if (modelIndex == visibleIndex - 1) {
+ if (modelIndex == visibleIndex - 1 && visibleItems.count()) {
// We can calculate exact postion in this case
currentItem->setPosition(visibleItems.first()->position() - currentItem->size() - spacing);
} else {