diff options
| author | Peter Penz <[email protected]> | 2008-03-30 13:19:01 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-03-30 13:19:01 +0000 |
| commit | e8cb5a292d146c833e65f1d14bfda1219bda8dfa (patch) | |
| tree | 3ec7c7c53372efbf46575ad99c56b3396eacd981 /src/dolphiniconsview.cpp | |
| parent | b6f970d355ee694bbe02e0e7d4f8b517f163c9a8 (diff) | |
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
Diffstat (limited to 'src/dolphiniconsview.cpp')
| -rw-r--r-- | src/dolphiniconsview.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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<KCategorizedSortFilterProxyModel*>(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(); |
