Bug 300557 - When a collection is updated, Amarok expands collapsed entries in the Collection Browser
Summary: When a collection is updated, Amarok expands collapsed entries in the Collect...
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collection Browser (show other bugs)
Version: 2.8.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 319508 (view as bug list)
Depends on:
Blocks: 188074
  Show dependency treegraph
 
Reported: 2012-05-24 11:22 UTC by Piotr Keplicz
Modified: 2016-10-17 08:33 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.9


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Keplicz 2012-05-24 11:22:11 UTC
When I plug in an iPod (a 6G), Amarok starts counting the tracks. Now, when I fold the iPod's listing, it automatically unfolds a moment later, when the tracks count is updated. That disrupts browsing the tracks in other collections.

Reproducible: Always

Steps to Reproduce:
1. Plug in an iPod.
2. Fold the iPod listing while tracks are being counted.
Actual Results:  
The iPod's listing is unfolded when the tracks count is updated.

Expected Results:  
The listing should remain folded until the user unfolds it.
Comment 1 Myriam Schweingruber 2012-05-25 20:24:04 UTC
Piotr could you please not forget to set the Amarok version in your reports.. I assume this is from git as well, right?
Comment 2 Piotr Keplicz 2012-05-25 21:27:15 UTC
Yes, it's from an up-to-date git.
Comment 3 Bart Cerneels 2012-05-29 14:51:40 UTC
This needs to be fixed in the view by keeping state of the opened sub-trees. It's non trivial and not possible to do for the next release. But I'll put it one the list of items needed for 2.7.
Comment 4 Matěj Laitl 2012-07-03 13:49:43 UTC
See also bug 188074 that complements this bug.
Comment 5 Mayank Madan 2012-12-01 08:00:22 UTC
Reproducible in v2.6.0-421-gf66a306
Comment 6 Matěj Laitl 2012-12-01 12:53:22 UTC
This is not specific to iPods and is a visual bug, nothing to do with iPod Collection. iPod collection is just one way to trigger this, other is UMS Collection, local collection...
Comment 7 Matěj Laitl 2013-05-23 13:47:33 UTC
*** Bug 319508 has been marked as a duplicate of this bug. ***
Comment 8 Mikhail Ivchenko 2013-12-01 12:06:00 UTC
Reproducible in v2.8.0
Comment 9 Matěj Laitl 2014-05-12 21:05:58 UTC
Git commit 3b5c6b2039ad943ae209341b5920fee929da9320 by Matěj Laitl.
Committed on 12/05/2014 at 21:01.
Pushed by laitl into branch 'master'.

CollectionBrowser: do not expand tree needlessly

The reasons were 2:
 * we were adding every collection to m_expandedCollections all the
   time, which then resulted in their expansion in each slotFilter()
 * we were doing auto-expansion even in cases where collection was
   updated, not just when user typed something

(fixed in is still 2.9 for consistency with earlier commits)

BACKPORT
FIXED-IN: 2.9

M  +1    -0    ChangeLog
M  +21   -16   src/browsers/CollectionTreeItemModelBase.cpp
M  +8    -3    src/browsers/CollectionTreeItemModelBase.h
M  +5    -5    src/browsers/CollectionTreeView.cpp
M  +1    -1    src/browsers/CollectionTreeView.h
M  +1    -1    tests/browsers/TestSingleCollectionTreeItemModel.cpp

http://commits.kde.org/amarok/3b5c6b2039ad943ae209341b5920fee929da9320
Comment 10 Matěj Laitl 2016-10-16 22:09:10 UTC
Git commit 9fb00e5a97574af3f0cb22d740da7e0cd0761d78 by Matěj Laitl.
Committed on 16/10/2016 at 22:03.
Pushed by laitl into branch 'master'.

Fix Collection Browser auto-expand after search expanding too little

Underlying model is asynchronous, we need to cope with that. Do it
using a RAII self-destructing object AutoExpander.

As a side-effect, Amarok no longer expands collection after start in
split collection mode. If this is desired, we may expand them
explicitly upon start.
Related: bug 335217
FIXED-IN: 2.9

M  +1    -0    ChangeLog
M  +68   -20   src/browsers/CollectionTreeView.cpp

http://commits.kde.org/amarok/9fb00e5a97574af3f0cb22d740da7e0cd0761d78
Comment 11 Piotr Keplicz 2016-10-17 08:33:52 UTC
Thanks :)