* When toggling playing, we need to check whether there is a valid current
playlist item - only if there is one, the controller handles this, otherwise we start the playlist again from start. * This fixes bug #5568. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36392 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d75c9c3da5
commit
eb74edd08b
@ -97,6 +97,11 @@ ControllerView::EnabledButtons()
|
||||
void
|
||||
ControllerView::TogglePlaying()
|
||||
{
|
||||
BAutolock _(fPlaylist);
|
||||
if (fPlaylist->CurrentItemIndex() < 0) {
|
||||
// No valid playlist item - start again from the first one
|
||||
fPlaylist->SetCurrentItemIndex(0);
|
||||
} else
|
||||
fController->TogglePlaying();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user