Bug 304363 - Expansion status of a tree structure in Details View and Folders Panel is forgotten after collapsing a top level folder
Summary: Expansion status of a tree structure in Details View and Folders Panel is for...
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 2.0
Platform: Ubuntu Linux
: NOR minor with 20 votes (vote)
Target Milestone: ---
Assignee: Dolphin Bug Assignee
Keywords: reproducible
: 306790 (view as bug list)
Depends on:
Reported: 2012-07-31 22:14 UTC by Marcelo Sales
Modified: 2013-10-26 09:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.0


Note You need to log in before you can comment on or make changes to this bug.
Description Marcelo Sales 2012-07-31 22:14:33 UTC
If there is a tree with several sub-nodes expanded in the folder panel and the user collapses an upper level node, Dolphin forgets which sub-nodes were expanded.
When the user expands again the same node which had been collapsed, only the next level subnodes are shown.
This is a regression. Dolphin used to remember which nodes were expanded and did show the tree exactly as it was before it was collapsed. I don't know in which version this behavior changed.

Reproducible: Always

Steps to Reproduce:
1. In folder view, expand a folder. Expand a subfolder of that folder. Expand another subfolder still one level deeper.
2. Collapse the first folder
3. Expand the first folder again
Actual Results:  
Only the direct children of the first folder are shown.

Expected Results:  
All the levels that were expanded before the first folder was collapsed should be expanded again when that folder was re-expanded.
Comment 1 Frank Reininghaus 2012-08-03 06:32:16 UTC
Thanks for the report!

The behaviour changed in KDE 4.8, when Dolphin replaced Qt's item views with its own view engine. This affects not only the Folders Panel, but also the Details View. It's certainly possible to fix this, but not in a straightforward way. Therefore, I'd like to see if there is a big demand to fix this before we think about how this could be implemented.
Comment 2 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:20:03 UTC
Resetting assignee to default as per bug #305719
Comment 3 Frank Reininghaus 2012-09-17 12:07:31 UTC
*** Bug 306790 has been marked as a duplicate of this bug. ***
Comment 4 Frank Reininghaus 2013-10-26 07:40:12 UTC
Git commit 07f0d125b212b926ce7d360d914aab304a6af96d by Frank Reininghaus.
Committed on 26/10/2013 at 07:36.
Pushed by freininghaus into branch 'master'.

Restore the tree state in Details View if a folder is re-expanded

This patch actually does two things when collapsing an expanded folder
with expanded children:

(a) It removes all expanded children (which are removed from the model)
    from m_expandedDirs.

(b) It remembers the expanded children and restores them if the
    top-level folder is re-expanded.
FIXED-IN: 4.12.0
REVIEW: 113293

M  +15   -0    dolphin/src/kitemviews/kfileitemmodel.cpp

Comment 5 Marcelo Sales 2013-10-26 09:47:47 UTC