From 9529883db15c59e3cf6993c700efbe8e0499ff71 Mon Sep 17 00:00:00 2001 From: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Date: Sat, 1 Jan 2022 14:10:46 -0800 Subject: [PATCH] Fix player tab opening multiple VV when closed by the X and reopened (#5986) --- Content.Client/Administration/AdminSystem.Menu.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Client/Administration/AdminSystem.Menu.cs b/Content.Client/Administration/AdminSystem.Menu.cs index 620fffec0c..6f02c3df1c 100644 --- a/Content.Client/Administration/AdminSystem.Menu.cs +++ b/Content.Client/Administration/AdminSystem.Menu.cs @@ -94,7 +94,12 @@ namespace Content.Client.Administration public void Open() { - _window ??= new AdminMenuWindow(); + if (_window == null) + { + _window = new AdminMenuWindow(); + _window.OnClose += Close; + } + _window.PlayerTabControl.OnEntryPressed += PlayerTabEntryPressed; _window.OpenCentered(); }