fix deleting last item from playlist if playing
This commit is contained in:
@@ -291,8 +291,11 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
|
|||||||
std::swap(now_playing, old_playing);
|
std::swap(now_playing, old_playing);
|
||||||
Mpd->Play(now_playing);
|
Mpd->Play(now_playing);
|
||||||
}
|
}
|
||||||
if (old_playing >= 0)
|
try
|
||||||
|
{
|
||||||
mPlaylist->BoldOption(old_playing, 0);
|
mPlaylist->BoldOption(old_playing, 0);
|
||||||
|
}
|
||||||
|
catch (std::out_of_range &) { }
|
||||||
mPlaylist->BoldOption(now_playing, 1);
|
mPlaylist->BoldOption(now_playing, 1);
|
||||||
if (Config.autocenter_mode)
|
if (Config.autocenter_mode)
|
||||||
mPlaylist->Highlight(now_playing);
|
mPlaylist->Highlight(now_playing);
|
||||||
|
|||||||
Reference in New Issue
Block a user