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_p.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/kitemviews/kitemlistviewlayouter_p.h') diff --git a/src/kitemviews/kitemlistviewlayouter_p.h b/src/kitemviews/kitemlistviewlayouter_p.h index 017f520fe..0d7c0d040 100644 --- a/src/kitemviews/kitemlistviewlayouter_p.h +++ b/src/kitemviews/kitemlistviewlayouter_p.h @@ -139,6 +139,15 @@ public: void markAsDirty(); +#ifndef QT_NO_DEBUG + /** + * @return True if the layouter has been marked as dirty and hence has + * not called yet doLayout(). Is enabled only in the debugging + * mode, as it is not useful to check the dirty state otherwise. + */ + bool isDirty(); +#endif + private: void doLayout(); void updateVisibleIndexes(); -- cgit v1.3.1