diff options
| author | Peter Penz <[email protected]> | 2011-10-26 01:17:57 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-10-26 01:18:53 +0200 |
| commit | 528262a6be4ab2ad7e17860a281ea80b90c1605b (patch) | |
| tree | 5e436411f713a980f1a9974f351472c69a4f5a04 /src/kitemviews/kitemlistview.cpp | |
| parent | 82b56ca6fd8831a896d1f6584b3a7dc0df6a8f85 (diff) | |
Group header fixes
- Simplify header for the horizontal scroll direction
- Fix issue that orientation change was not forwarded to the header
Diffstat (limited to 'src/kitemviews/kitemlistview.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistview.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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<KItemListWidget*, KItemListGroupHeader*> 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<int, KItemListWidget*> it(m_visibleItems); while (it.hasNext()) { it.next(); - KItemListWidget* widget = it.value(); - updateGroupHeaderForWidget(widget); + updateGroupHeaderForWidget(it.value()); } } else { // Clear all visible headers |
