Fix forgetting last song after singing.
This commit is contained in:
1 parent
388a5b4078
commit
5277504e34
2 files changed
+14
-6
No files matched your search
@@ -116,7 +116,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
//the real selected song for singing
|
||||
protected int _Locked { get; set; }
|
||||
|
||||
private int _PreviewIdInternal = -1;
|
||||
protected int _PreviewIdInternal = -1;
|
||||
protected virtual int _PreviewId
|
||||
{
|
||||
get { return _PreviewIdInternal; }
|
||||
@@ -523,7 +523,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
CBase.Songs.SetCategory(-1);
|
||||
}
|
||||
|
||||
private void _PlaySong(int nr)
|
||||
protected void _PlaySong(int nr)
|
||||
{
|
||||
if (CBase.Songs.IsInCategory() && (_PreviewId != nr || _Streams.Count == 0))
|
||||
{
|
||||
@@ -555,6 +555,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_Streams.Add(stream);
|
||||
_PreviewSongStream = stream;
|
||||
|
||||
_PreviewIdInternal = nr;
|
||||
|
||||
if (song.VideoFileName != "" && CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
_PreviewVideoStream = CBase.Video.Load(Path.Combine(song.Folder, song.VideoFileName));
|
||||
|
||||
@@ -67,9 +67,14 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
{
|
||||
set
|
||||
{
|
||||
base._PreviewId = value;
|
||||
base._PlaySong(value);
|
||||
base._PreviewIdInternal = value;
|
||||
_UpdatePreview();
|
||||
}
|
||||
get
|
||||
{
|
||||
return base._PreviewIdInternal;
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetActualSelection()
|
||||
@@ -222,7 +227,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
_EnterCategory(0);
|
||||
_ActualSelection = -1;
|
||||
_Locked = -1;
|
||||
_PreviewId = -1;
|
||||
_UpdateList(0, true);
|
||||
//AfterCategoryChange();
|
||||
SetSelectedSong(_PreviewId);
|
||||
@@ -371,9 +375,10 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
}
|
||||
|
||||
if (!keyEvent.Handled)
|
||||
{
|
||||
_PreviewId = _Locked;
|
||||
{
|
||||
_ActualSelection = _Locked;
|
||||
if (_PreviewId != _Locked)
|
||||
_PreviewId = _Locked;
|
||||
|
||||
for (int i = 0; i < _Tiles.Count; i++)
|
||||
_Tiles[i].Selected = _Locked == i + _Offset;
|
||||
@@ -554,6 +559,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
public override void SetSelectedSong(int visibleSongNr)
|
||||
{
|
||||
base._PlaySong(visibleSongNr);
|
||||
base.SetSelectedSong(visibleSongNr);
|
||||
|
||||
if (visibleSongNr >= 0 && visibleSongNr < CBase.Songs.GetNumSongsVisible())
|
||||
|
||||
Reference in new issue
Block a user