Bug 302703 - [Dolphin 2.1] Icons view mode 'messed up' after switching from details view mode (w/o expandable folders)
Summary: [Dolphin 2.1] Icons view mode 'messed up' after switching from details view m...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: icons mode (show other bugs)
Version: 2.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL: http://youtu.be/_8OnLZu3r-A
Keywords: reproducible
: 306242 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-28 15:27 UTC by gedgon
Modified: 2013-07-24 20:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gedgon 2012-06-28 15:27:22 UTC
...

Reproducible: Always

Steps to Reproduce:
1. Turn off expandable folders for details view mode
2. Restart Dolphin
3. Change view mode from details to icons
Actual Results:  
...

Expected Results:  
...

*screencast attached
Comment 1 Frank Reininghaus 2012-06-28 15:51:24 UTC
Thanks for the bug report! I can confirm this issue in master.
Comment 2 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:18:34 UTC
Resetting assignee to default as per bug #305719
Comment 3 Frank Reininghaus 2012-09-04 11:08:03 UTC
*** Bug 306242 has been marked as a duplicate of this bug. ***
Comment 4 Frank Reininghaus 2013-07-24 20:48:09 UTC
Hm, for some reason, pushing the commit did not close the bug report. Here it is:

http://quickgit.kde.org/?p=kde-baseapps.git&a=commit&h=69c9100f91775560fe75f7910fd18a649fadaad1

Note that this commit is currently only in the master branch (which is going to become KDE 4.12). Considering that the bug is not a big showstopper and that the fix required some non-trivial changes in important classes, I prefer not to commit it to the 4.11 branch right now. It would not get much testing before KDE 4.11.0, and I do not want to risk regressions.
Comment 5 Frank Reininghaus 2013-07-24 20:58:05 UTC
Git commit 69c9100f91775560fe75f7910fd18a649fadaad1 by Frank Reininghaus.
Committed on 24/07/2013 at 20:30.
Pushed by freininghaus into branch 'master'.

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.
REVIEW: 111632
FIXED-IN: 4.12.0

M  +0    -6    dolphin/src/kitemviews/kfileitemlistview.cpp
M  +7    -17   dolphin/src/kitemviews/kstandarditemlistview.cpp
M  +1    -0    dolphin/src/kitemviews/kstandarditemlistview.h
M  +9    -12   dolphin/src/views/dolphinitemlistview.cpp
M  +1    -0    dolphin/src/views/dolphinitemlistview.h

http://commits.kde.org/kde-baseapps/69c9100f91775560fe75f7910fd18a649fadaad1