Merge pull request #476 from Vocaluxe/KeyFilterToPlaylist

Key shortcut to show only songs of the current playlist (add #218)
This commit is contained in:
Stefan authored and GitHub committed 2020-02-02 19:01:47 +01:00
commit c6c0688f3b
2 files changed
+24 -3

No files matched your search

+1
View File
@@ -140,6 +140,7 @@ Song screen
[CTRL] + [A] to sing all songs
[CTRL] + [S] to sing current song in medley version
[CTRL] + [V] to sing all songs from a category
[CTRL] + [L] to filter the song list to the current displayed playlist. Press again to remove this filter.
[NUM_1]..[NUM_6] to use a Joker for team 1..6
[A]..[Z] to jump to category/song title starting with that letters (multiple letters possible)
[PAGE UP] or [PAGE DOWN] to scroll one page up/down
+23 -3
View File
@@ -363,6 +363,13 @@ namespace Vocaluxe.Screens
_ShowHighscore();
}
break;
case Keys.L:
if (keyEvent.Mod == EModifier.Ctrl)
{
_TogglePlaylistFilter();
}
break;
}
if (!_SearchActive)
{
@@ -869,9 +876,6 @@ namespace Vocaluxe.Screens
CParty.OnSongChange(_SelectedSongID, ref _Sso);
}
_Sso = CParty.GetSongSelectionOptions();
if (_Sso.Selection.PartyMode)
{
CSongs.Sort(_Sso.Sorting.SongSorting, _Sso.Sorting.Tabs, _Sso.Sorting.IgnoreArticles, _Sso.Sorting.SearchString, _Sso.Sorting.DuetOptions, _Sso.Sorting.FilterPlaylistID);
@@ -1253,6 +1257,22 @@ namespace Vocaluxe.Screens
_JumpTo_lastSearchString = searchString;
}
public void _TogglePlaylistFilter()
{
if (_Sso.Sorting.FilterPlaylistID == _Playlist.ActivePlaylistID)
{
if (_Playlist.ActivePlaylistID == -1)
return;
_Sso.Sorting.FilterPlaylistID = -1;
}
else
_Sso.Sorting.FilterPlaylistID = _Playlist.ActivePlaylistID;
CSongs.Sort(_Sso.Sorting.SongSorting, _Sso.Sorting.Tabs, _Sso.Sorting.IgnoreArticles, _Sso.Sorting.SearchString, _Sso.Sorting.DuetOptions, _Sso.Sorting.FilterPlaylistID);
_SongMenu.OnShow();
}
private void _ApplyNewSearchFilter(string newFilterString)
{
CParty.SetSearchString(newFilterString, _SearchActive);