* 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:
@@ -97,7 +97,12 @@ ControllerView::EnabledButtons()
|
|||||||
void
|
void
|
||||||
ControllerView::TogglePlaying()
|
ControllerView::TogglePlaying()
|
||||||
{
|
{
|
||||||
fController->TogglePlaying();
|
BAutolock _(fPlaylist);
|
||||||
|
if (fPlaylist->CurrentItemIndex() < 0) {
|
||||||
|
// No valid playlist item - start again from the first one
|
||||||
|
fPlaylist->SetCurrentItemIndex(0);
|
||||||
|
} else
|
||||||
|
fController->TogglePlaying();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user