add support for adding tracks to playlist after highlighted item
This commit is contained in:
@@ -50,6 +50,7 @@ void SelectedItemsAdder::Init()
|
||||
itsPositionSelector->AddOption("At the beginning of playlist");
|
||||
itsPositionSelector->AddOption("After current track");
|
||||
itsPositionSelector->AddOption("After current album");
|
||||
itsPositionSelector->AddOption("After highlighted item");
|
||||
itsPositionSelector->AddSeparator();
|
||||
itsPositionSelector->AddOption("Cancel");
|
||||
|
||||
@@ -230,6 +231,10 @@ void SelectedItemsAdder::EnterPressed()
|
||||
break;
|
||||
successful_operation = myPlaylist->Add(list, 0, i);
|
||||
}
|
||||
else if (pos == 4) // after highlighted item
|
||||
{
|
||||
successful_operation = myPlaylist->Add(list, 0, std::min(myPlaylist->Items->Choice()+1, myPlaylist->Items->Size()));
|
||||
}
|
||||
else
|
||||
{
|
||||
w = itsPlaylistSelector;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
class SelectedItemsAdder : public Screen< Menu<std::string> >
|
||||
{
|
||||
public:
|
||||
SelectedItemsAdder() : itsPSWidth(35), itsPSHeight(10) { }
|
||||
SelectedItemsAdder() : itsPSWidth(35), itsPSHeight(11) { }
|
||||
|
||||
virtual void SwitchTo();
|
||||
virtual void Resize();
|
||||
|
||||
Reference in New Issue
Block a user