Summary: | Automatically scroll sometimes centers on the previous track | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Anthony Vital <anthony.vital> |
Component: | Playlist | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | fatlardo |
Priority: | NOR | ||
Version: | 2.1 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
patch EngineObserver.h
patch EngineObserver.cpp |
Description
Anthony Vital
2009-06-06 02:19:53 UTC
Confirmed in latest svn. Perhaps the playlist is being centred before amarok has chance to start playing the next track? Gary Playlist scrolling seems to be broken in general, I set those various playlist scrolling bug reports as duplicates. *** This bug has been marked as a duplicate of bug 193459 *** Created attachment 36334 [details]
patch EngineObserver.h
-OK my bad, I wanted to post this text first :p I know this bug is marked as duplicate, but I'm not really sure that both are related. Anyways, I investigated the code a little bit, and I think I figured what's wrong: The EngineObservers are stored in a QSet, which is unsorted (and unpredictable). So from time to time, when iterating through the EngineObservers (when EngineObserver::engineNewTrackPlaying() is triggered for instance), if Playlist::PrettyListView (where autoscroll is done) is coming before Playlist::Actions, then the playlist is being centered before Amarok moves on to the next track (as Gary said). The problem is that there is no way to ensure a certain order in a QSet, so maybe the solution would be to use something like QList instead? I add a small patch replacing QSet by QList to illustrate. Created attachment 36335 [details]
patch EngineObserver.cpp
second part of the patch
Anthony, please report your patch to the other bug. If you read the description, those are indeed the same bug, (ignore the second part of the initial bug message there). This bug here is closed and nobody will see the patch here... Yes I'm sorry, you're right, I misunderstood it. |