summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-02 05:45:21 (GMT)
committerToby Tomkins <toby.tomkins@nokia.com>2010-08-03 03:09:19 (GMT)
commita06c10b864cd41673b2f65874c112f7f1cb7dbf3 (patch)
treef82743b2f729fc0a128dea322b680e65a96ae5ba
parent611b88a58061912e498b2d00fd4b085449b5ef8e (diff)
downloadQt-a06c10b864cd41673b2f65874c112f7f1cb7dbf3.zip
Qt-a06c10b864cd41673b2f65874c112f7f1cb7dbf3.tar.gz
Qt-a06c10b864cd41673b2f65874c112f7f1cb7dbf3.tar.bz2
Make sure ListView.nextSection attached property is set for the first item
Task-number: QTBUG-12470 Reviewed-by: Bea Lam (cherry picked from commit 2501c66e3795040d72a1922499294a686832e7a2)
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index b0a11b9..256948a 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -575,9 +575,11 @@ FxListItem *QDeclarativeListViewPrivate::createItem(int modelIndex)
listItem->attached->m_prevSection = item->attached->section();
else
listItem->attached->m_prevSection = sectionAt(modelIndex-1);
+ }
+ if (modelIndex < model->count()-1) {
if (FxListItem *item = visibleItem(modelIndex+1))
listItem->attached->m_nextSection = item->attached->section();
- else if (modelIndex < model->count()-1)
+ else
listItem->attached->m_nextSection = sectionAt(modelIndex+1);
}
}