From 381c709639ec9f3bbac4d93a4b3e1dc962be5b4a Mon Sep 17 00:00:00 2001 From: naoey Date: Fri, 11 Aug 2017 10:10:55 +0530 Subject: [PATCH] Fix selectorTab Depth if it's wonky when new tabs are added. --- osu.Game/Overlays/Chat/ChatTabControl.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osu.Game/Overlays/Chat/ChatTabControl.cs b/osu.Game/Overlays/Chat/ChatTabControl.cs index baa6fb3ab6..ef4760d166 100644 --- a/osu.Game/Overlays/Chat/ChatTabControl.cs +++ b/osu.Game/Overlays/Chat/ChatTabControl.cs @@ -50,6 +50,15 @@ namespace osu.Game.Overlays.Chat ChannelSelectorActive.BindTo(selectorTab.Active); } + protected override void AddTabItem(TabItem 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 CreateTabItem(Channel value) { ChannelTabItem tab = new ChannelTabItem(value);