From dbc5fd7a491f95ca4084a113d0f902ea975478fd Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 22 Feb 2012 18:28:11 +0100 Subject: Fix alternate backgrounds when enabling grouping Up to now the alternating backgrounds just have been calculated by checking whether the item index is odd. This does not work well when grouping is enabled: In this case the alternate background color of the first item of a group should stay consistent. --- src/kitemviews/kitemlistviewlayouter.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/kitemviews/kitemlistviewlayouter.cpp') diff --git a/src/kitemviews/kitemlistviewlayouter.cpp b/src/kitemviews/kitemlistviewlayouter.cpp index 744914929..d8b5796ec 100644 --- a/src/kitemviews/kitemlistviewlayouter.cpp +++ b/src/kitemviews/kitemlistviewlayouter.cpp @@ -340,6 +340,14 @@ void KItemListViewLayouter::markAsDirty() m_dirty = true; } + +#ifndef QT_NO_DEBUG + bool KItemListViewLayouter::isDirty() + { + return m_dirty; + } +#endif + void KItemListViewLayouter::doLayout() { if (m_dirty) { -- cgit v1.3