Version: 2.1 (using KDE 4.2.2) Compiler: g++ 4.3.3 cmake 2.6-patch 2 , Qt 4.5.0 OS: Linux Installed from: Ubuntu Packages Sometimes, the automatic scrolling centers on the previous track instead of the current one. This always happens -if it happens- at amarok start up. I mean, either everything works fine as long as amarok is not quit, either the problem appears on the first track I want to play and stays until amarok is quit. If the wrong track (let's say "track A") is centered, I can click on the "display current track" button, it works fine, "track B" (the good one) is centered. But when amarok goes to the next one ("track C") (skip button or end of the song), then "track B" is centered instead of "track C" and so on... It's a weird one, as I can't figure out a reliable pattern to reproduce it. But it actually happens quite often on my system, about 50% of the time.
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.