correct playlist clearing

This commit is contained in:
unknown
2008-08-15 12:15:34 +02:00
parent b6a912e507
commit 8deaa0a9e3
4 changed files with 4 additions and 5 deletions

View File

@@ -153,7 +153,7 @@ void NcmpcppStatusChanged(MpdObj *conn, ChangedStatusType what)
{
if (playlist_length < vPlaylist.size())
{
mPlaylist->Clear(!playlist_length && current_screen == csPlaylist);
mPlaylist->Clear(playlist_length < mPlaylist->GetHeight() && current_screen == csPlaylist);
for (vector<Song *>::iterator it = vPlaylist.begin(); it != vPlaylist.end(); it++)
delete *it;
vPlaylist.clear();