From 84d455b9f862dcbfdffd5827ceab4890dcf653cc Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Tue, 20 Feb 2024 14:01:28 +0100 Subject: [PATCH] Fix PlayerListControl re-raising selection changed when repopulated. (#25412) Now we just skip duplicate "item pressed" events from the ListContainer. This caused the ahelp window to unfocus the message box after sending something. Flow is something like this: you send ahelp -> bwoink window refreshes player list due to new bwoink -> repopulated player list -> sent selection change -> repopulates right pane -> line edit gets unfocused. --- .../Administration/UI/CustomControls/PlayerListControl.xaml.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs index 2bef0d8701..fdf935d7c0 100644 --- a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs +++ b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs @@ -52,6 +52,9 @@ namespace Content.Client.Administration.UI.CustomControls if (args == null || data is not PlayerListData {Info: var selectedPlayer}) return; + if (selectedPlayer == _selectedPlayer) + return; + if (args.Event.Function != EngineKeyFunctions.UIClick) return;