1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-29 06:09:59 +08:00

Fix selectorTab Depth if it's wonky when new tabs are added.

This commit is contained in:
naoey
2017-08-11 10:10:55 +05:30
Unverified
parent 8dbbc623c7
commit 381c709639
+9
View File
@@ -50,6 +50,15 @@ namespace osu.Game.Overlays.Chat
ChannelSelectorActive.BindTo(selectorTab.Active);
}
protected override void AddTabItem(TabItem<Channel> item, bool addToDropdown = true)
{
if (selectorTab.Depth < float.MaxValue)
// performTabSort might've made selectorTab's position wonky, fix it
TabContainer.ChangeChildDepth(selectorTab, float.MaxValue);
base.AddTabItem(item, addToDropdown);
}
protected override TabItem<Channel> CreateTabItem(Channel value)
{
ChannelTabItem tab = new ChannelTabItem(value);