MediaPlayer: Double-click on playlist item to restart it
Double-clicking on the currently playing playlist item restart that item's playback from the beginning. Ticket #6560.
This commit is contained in:
parent
8df5e79d2c
commit
bac3774d59
@ -360,7 +360,7 @@ Playlist::ItemAtFast(int32 index) const
|
||||
|
||||
|
||||
bool
|
||||
Playlist::SetCurrentItemIndex(int32 index)
|
||||
Playlist::SetCurrentItemIndex(int32 index, bool forceNotify)
|
||||
{
|
||||
bool result = true;
|
||||
if (index >= CountItems()) {
|
||||
@ -371,7 +371,7 @@ Playlist::SetCurrentItemIndex(int32 index)
|
||||
index = -1;
|
||||
result = false;
|
||||
}
|
||||
if (index == fCurrentIndex)
|
||||
if (index == fCurrentIndex && !forceNotify)
|
||||
return result;
|
||||
|
||||
fCurrentIndex = index;
|
||||
|
@ -91,7 +91,8 @@ public:
|
||||
PlaylistItem* ItemAtFast(int32 index) const;
|
||||
|
||||
// navigating current ref
|
||||
bool SetCurrentItemIndex(int32 index);
|
||||
bool SetCurrentItemIndex(int32 index,
|
||||
bool forceNotify = false);
|
||||
int32 CurrentItemIndex() const;
|
||||
|
||||
void GetSkipInfo(bool* canSkipPrevious,
|
||||
|
@ -331,7 +331,7 @@ PlaylistListView::MouseDown(BPoint where)
|
||||
// only do something if user clicked the same item twice
|
||||
if (fLastClickedItem == item) {
|
||||
BAutolock _(fPlaylist);
|
||||
fPlaylist->SetCurrentItemIndex(i);
|
||||
fPlaylist->SetCurrentItemIndex(i, true);
|
||||
handled = true;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user