mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Fix Selected tab beeing choosen multiple times
This commit is contained in:
@ -58,9 +58,6 @@ namespace osu.Game.Overlays.Chat
|
||||
TabContainer.SetLayoutPosition(selectorTab, float.MaxValue);
|
||||
|
||||
base.AddTabItem(item, addToDropdown);
|
||||
|
||||
if (SelectedTab == null)
|
||||
SelectTab(item);
|
||||
}
|
||||
|
||||
protected override TabItem<Channel> CreateTabItem(Channel value) => new ChannelTabItem(value) { OnRequestClose = tabCloseRequested };
|
||||
|
@ -79,6 +79,8 @@ namespace osu.Game.Overlays.Chat
|
||||
ChannelTabControl.AddItem(channel);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void RemoveItem(Channel channel)
|
||||
|
@ -31,14 +31,6 @@ namespace osu.Game.Overlays.Chat
|
||||
};
|
||||
}
|
||||
|
||||
protected override void AddTabItem(TabItem<Channel> item, bool addToDropdown = true)
|
||||
{
|
||||
base.AddTabItem(item, addToDropdown);
|
||||
|
||||
if (SelectedTab == null)
|
||||
SelectTab(item);
|
||||
}
|
||||
|
||||
private void tabCloseRequested(TabItem<Channel> priv)
|
||||
{
|
||||
int totalTabs = TabContainer.Count -1; // account for selectorTab
|
||||
|
@ -139,12 +139,14 @@ namespace osu.Game.Overlays.Chat
|
||||
Text = value.Name,
|
||||
Margin = new MarginPadding(1),
|
||||
TextSize = 18,
|
||||
Alpha = 0,
|
||||
},
|
||||
closeButton = new ChatTabItemCloseButton
|
||||
{
|
||||
Height = 1,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Alpha = 0,
|
||||
Margin = new MarginPadding
|
||||
{
|
||||
Right = 5
|
||||
|
Reference in New Issue
Block a user