summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-13 08:29:18 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-13 08:29:18 (GMT)
commitee3ad7e774a959454eb3c367b40a8a4bdfab45bc (patch)
treed739768a02772e00def60ae448be114648a8b9d3 /src
parenta296749eaea94ae4ed36086b632d32c87d3d99c9 (diff)
parent3b36a817fda1b7774b58391d508524f9e39df130 (diff)
downloadQt-ee3ad7e774a959454eb3c367b40a8a4bdfab45bc.zip
Qt-ee3ad7e774a959454eb3c367b40a8a4bdfab45bc.tar.gz
Qt-ee3ad7e774a959454eb3c367b40a8a4bdfab45bc.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Ensure the section header isn't shown twice.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 91e9995..cd26472 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -494,7 +494,7 @@ public:
QSmoothedAnimation *highlightSizeAnimator;
QDeclarativeViewSection *sectionCriteria;
QString currentSection;
- static const int sectionCacheSize = 3;
+ static const int sectionCacheSize = 4;
QDeclarativeItem *sectionCache[sectionCacheSize];
qreal spacing;
qreal highlightMoveSpeed;
@@ -1029,6 +1029,11 @@ void QDeclarativeListViewPrivate::updateCurrent(int modelIndex)
}
currentItem->item->setFocus(true);
currentItem->attached->setIsCurrentItem(true);
+ // Avoid showing section delegate twice. We still need the section heading so that
+ // currentItem positioning works correctly.
+ // This is slightly sub-optimal, but section heading caching minimizes the impact.
+ if (currentItem->section)
+ currentItem->section->setVisible(false);
}
updateHighlight();
emit q->currentIndexChanged();