diff options
| author | Frank Reininghaus <[email protected]> | 2013-07-24 22:30:54 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2013-07-24 22:31:48 +0200 |
| commit | 3991e9d24eb2aba2ea7228f925cfa0a60e55463f (patch) | |
| tree | 9ee2b15764b79a2fb9c2878708e9ce653d381877 /src/kitemviews/kfileitemlistview.cpp | |
| parent | 0ad86983f4d746d2995720b895c14051556eeeee (diff) | |
Make sure that widgets are initialized when changing the view mode
The problem was that DolphinItemListView overrides the virtual function
onItemLayoutChanged() without calling the base class implementation.
Therefore, KStandardItemListView::updateLayoutOfVisibleItems(), which
calls initializeItemListWidget(), is never called.
This patch refactors the "change item layout"/"supports item expanding"
code a bit to make it more robust and fix the problem that the view
looks "messed up" when switching from Details View without expandable
folders to Icons View.
I'm only pushing this patch to master (going to be KDE 4.12).
The patch is a bit too intrusive for the KDE/4.11 branch for my taste
at this point of the release cycle, and the bug is not a real
showstopper. If it works well in master, one could consider backporting
it to a 4.11.x bug fix release.
Thanks to Emmanuel Pescosta for helping to analyze this issue.
BUG: 302703
REVIEW: 111632
FIXED-IN: 4.12.0
Diffstat (limited to 'src/kitemviews/kfileitemlistview.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemlistview.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/kitemviews/kfileitemlistview.cpp b/src/kitemviews/kfileitemlistview.cpp index 2da238d7a..1f0fcbd6f 100644 --- a/src/kitemviews/kfileitemlistview.cpp +++ b/src/kitemviews/kfileitemlistview.cpp @@ -213,12 +213,6 @@ void KFileItemListView::onPreviewsShownChanged(bool shown) void KFileItemListView::onItemLayoutChanged(ItemLayout current, ItemLayout previous) { - if (previous == DetailsLayout || current == DetailsLayout) { - // The details-layout requires some invisible roles that - // must be added to the model if the new layout is "details". - // If the old layout was "details" the roles will get removed. - applyRolesToModel(); - } KStandardItemListView::onItemLayoutChanged(current, previous); triggerVisibleIndexRangeUpdate(); } |
