1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 07:18:00 +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

@@ -217,9 +217,19 @@ function Player() // {{{
}, },
play: function play() play: function play()
{
//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); gMM.sequencer.playView(SBGetBrowser().currentMediaListView, 0);
focusTrack(gMM.sequencer.currentItem); focusTrack(gMM.sequencer.currentItem);
}
}, },
stop: function stop() stop: function stop()