1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 19:22:54 +08:00

Fix channel tab keyboard shortcut

Filter out the selector tab item at the point of enumerating tabs to fix
the regression of the Alt+number key shortcut.
This commit is contained in:
Bartłomiej Dach 2020-01-30 21:44:53 +01:00
parent fcd05b5a3c
commit 1553444001

View File

@ -321,8 +321,11 @@ namespace osu.Game.Overlays
private void selectTab(int index)
{
var channel = ChannelTabControl.Items.Skip(index).FirstOrDefault();
if (channel != null && !(channel is ChannelSelectorTabItem.ChannelSelectorTabChannel))
var channel = ChannelTabControl.Items
.Where(tab => !(tab is ChannelSelectorTabItem.ChannelSelectorTabChannel))
.Skip(index)
.FirstOrDefault();
if (channel != null)
ChannelTabControl.Current.Value = channel;
}