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;
}