1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 05:27:59 +01:00

Modified play() for playing selected tracks in the view

This commit is contained in:
Prathyush Thota
2009-03-22 06:38:07 +05:30
parent a51cf072c9
commit 2cfd2ee5ba

View File

@@ -218,8 +218,18 @@ function Player() // {{{
play: function play()
{
gMM.sequencer.playView(SBGetBrowser().currentMediaListView, 0);
focusTrack(gMM.sequencer.currentItem);
//Check if there is any selection in place, else play first item of the visible view.
if (_SBGetCurrentView().selection.count != 0)
{
//Play the selection.
gMM.sequencer.playView(_SBGetCurrentView(),_SBGetCurrentView().getIndexForItem(_SBGetCurrentView().selection.currentMediaItem));
focusTrack(gMM.sequencer.currentItem);
}
else
{
gMM.sequencer.playView(SBGetBrowser().currentMediaListView, 0);
focusTrack(gMM.sequencer.currentItem);
}
},
stop: function stop()