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:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user