Fixed JumpTo method, JumpTo is still disabled in 0.1

This commit is contained in:
Stephan Sundermann committed 2012-03-21 15:22:31 +01:00
1 parent 6e99108287
commit fc0dd193ba
1 file changed
+5 -6
+5 -6
View File
@@ -63,7 +63,7 @@ namespace Vocaluxe.Screens
{
JumpTo(KeyEvent.Unicode);
return true;
}*/
} */
}
else
{
@@ -304,11 +304,10 @@ namespace Vocaluxe.Screens
id = CSongs.VisibleSongs[song].ID;
}
// here is a fault: SetSelectedSong should point to the visible index
Vocaluxe.Lib.Song.CSong s = Array.Find<Vocaluxe.Lib.Song.CSong>(CSongs.VisibleSongs, element => element.Artist.StartsWith(Letter.ToString(), StringComparison.OrdinalIgnoreCase));
if (s != null && s.ID > -1)
int visibleID = Array.FindIndex<Vocaluxe.Lib.Song.CSong>(CSongs.VisibleSongs, element => element.Artist.StartsWith(Letter.ToString(), StringComparison.OrdinalIgnoreCase));
if (visibleID > -1)
{
id = s.ID;
id = visibleID;
SongMenus[htSongMenus(SongMenu)].SetSelectedSong(id);
}
}
@@ -345,4 +344,4 @@ namespace Vocaluxe.Screens
SongMenus[htSongMenus(SongMenu)].OnShow();
}
}
}
}