fix reloading lyrics after song's change

This commit is contained in:
Andrzej Rybczak
2009-02-18 22:38:57 +01:00
parent f16fb6f93d
commit 072f611896

View File

@@ -106,8 +106,7 @@ void Lyrics::SwitchTo()
} }
# endif # endif
MPD::Song *s = Reload ? myPlaylist->CurrentSong() : myScreen->CurrentSong(); const MPD::Song *s = Reload ? &myPlaylist->NowPlayingSong() : myScreen->CurrentSong();
Reload = 0;
if (!s) if (!s)
return; return;
@@ -118,8 +117,11 @@ void Lyrics::SwitchTo()
Resize(); Resize();
itsScrollBegin = 0; itsScrollBegin = 0;
itsSong = *s; itsSong = *s;
myOldScreen = myScreen; if (!Reload)
myScreen = this; {
myOldScreen = myScreen;
myScreen = this;
}
redraw_header = 1; redraw_header = 1;
w->Clear(); w->Clear();
# ifdef HAVE_CURL_CURL_H # ifdef HAVE_CURL_CURL_H
@@ -133,6 +135,7 @@ void Lyrics::SwitchTo()
w->Flush(); w->Flush();
# endif # endif
} }
Reload = 0;
} }
} }