From e8cb5a292d146c833e65f1d14bfda1219bda8dfa Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 30 Mar 2008 13:19:01 +0000 Subject: Third attempt for fixing the layout issue, this time without side effects and only with very minor performance overhead... svn path=/trunk/KDE/kdebase/apps/; revision=791824 --- src/dolphiniconsview.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/dolphiniconsview.cpp') diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index da1784c31..dd83de37e 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -133,6 +133,18 @@ DolphinIconsView::~DolphinIconsView() m_categoryDrawer = 0; } +void DolphinIconsView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight) +{ + KCategorizedView::dataChanged(topLeft, bottomRight); + + KCategorizedSortFilterProxyModel* proxyModel = dynamic_cast(model()); + if ((flow() == QListView::LeftToRight) && !proxyModel->isCategorizedModel()) { + // bypass a QListView issue that items are not layout correctly if the decoration size of + // an index changes + scheduleDelayedItemsLayout(); + } +} + QStyleOptionViewItem DolphinIconsView::viewOptions() const { QStyleOptionViewItem viewOptions = KCategorizedView::viewOptions(); -- cgit v1.3