Fixed JumpTo method, JumpTo is still disabled in 0.1
This commit is contained in:
1 parent
6e99108287
commit
fc0dd193ba
1 file changed
+4
-5
@@ -63,7 +63,7 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
JumpTo(KeyEvent.Unicode);
|
JumpTo(KeyEvent.Unicode);
|
||||||
return true;
|
return true;
|
||||||
}*/
|
} */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -304,11 +304,10 @@ namespace Vocaluxe.Screens
|
|||||||
id = CSongs.VisibleSongs[song].ID;
|
id = CSongs.VisibleSongs[song].ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
// here is a fault: SetSelectedSong should point to the visible index
|
int visibleID = Array.FindIndex<Vocaluxe.Lib.Song.CSong>(CSongs.VisibleSongs, element => element.Artist.StartsWith(Letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
||||||
Vocaluxe.Lib.Song.CSong s = Array.Find<Vocaluxe.Lib.Song.CSong>(CSongs.VisibleSongs, element => element.Artist.StartsWith(Letter.ToString(), StringComparison.OrdinalIgnoreCase));
|
if (visibleID > -1)
|
||||||
if (s != null && s.ID > -1)
|
|
||||||
{
|
{
|
||||||
id = s.ID;
|
id = visibleID;
|
||||||
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(id);
|
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user