diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-08-02 05:45:21 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-08-02 05:45:21 (GMT) |
commit | 2501c66e3795040d72a1922499294a686832e7a2 (patch) | |
tree | 44683ffd0dc4a0ba4c19dd1a7362673e0743911f /src/declarative/graphicsitems/qdeclarativelistview.cpp | |
parent | 666a475ea8c32eb5c49a53b29defc2c66c9cc5e3 (diff) | |
download | Qt-2501c66e3795040d72a1922499294a686832e7a2.zip Qt-2501c66e3795040d72a1922499294a686832e7a2.tar.gz Qt-2501c66e3795040d72a1922499294a686832e7a2.tar.bz2 |
Make sure ListView.nextSection attached property is set for the first item
Task-number: QTBUG-12470
Reviewed-by: Bea Lam
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativelistview.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativelistview.cpp | 4 |
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); } } |