Corrected center on last played track

This commit is contained in:
Arnaud Bienner 2011-02-11 20:16:42 +00:00
parent c8aed5fd30
commit e6b59de56b
2 changed files with 4 additions and 1 deletions

View File

@ -1123,7 +1123,6 @@ void Playlist::ItemsLoaded() {
last_played_item_index_ =
p.last_played == -1 ? QModelIndex() : index(p.last_played);
current_item_index_ = last_played_item_index_;
if (!p.dynamic_type.isEmpty()) {
GeneratorPtr gen = Generator::Create(p.dynamic_type);

View File

@ -685,6 +685,10 @@ void PlaylistView::JumpToLastPlayedTrack() {
if (!last_played.isValid())
return;
// Select last played song
last_current_item_ = last_played;
setCurrentIndex(last_current_item_);
currently_autoscrolling_ = true;
// Scroll to the item