mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 03:38:00 +01:00
Modified play() for playing selected tracks in the view
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user