From 528262a6be4ab2ad7e17860a281ea80b90c1605b Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 26 Oct 2011 01:17:57 +0200 Subject: Group header fixes - Simplify header for the horizontal scroll direction - Fix issue that orientation change was not forwarded to the header --- src/kitemviews/kitemlistview.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/kitemviews/kitemlistview.cpp') diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 6b199c1bb..84b844084 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -117,6 +117,15 @@ void KItemListView::setScrollOrientation(Qt::Orientation orientation) m_layouter->setScrollOrientation(orientation); m_animation->setScrollOrientation(orientation); m_sizeHintResolver->clearCache(); + + if (m_grouped) { + QMutableHashIterator it (m_visibleGroups); + while (it.hasNext()) { + it.next(); + it.value()->setScrollOrientation(orientation); + } + } + updateLayout(); onScrollOrientationChanged(orientation, previousOrientation); @@ -857,8 +866,7 @@ void KItemListView::slotGroupedSortingChanged(bool current) QHashIterator it(m_visibleItems); while (it.hasNext()) { it.next(); - KItemListWidget* widget = it.value(); - updateGroupHeaderForWidget(widget); + updateGroupHeaderForWidget(it.value()); } } else { // Clear all visible headers -- cgit v1.3