]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix PlayerListControl re-raising selection changed when repopulated. (#25412)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Tue, 20 Feb 2024 13:01:28 +0000 (14:01 +0100)
committerGitHub <noreply@github.com>
Tue, 20 Feb 2024 13:01:28 +0000 (14:01 +0100)
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.

Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs

index 2bef0d87019bcaba79c372feec43b170002bf13d..fdf935d7c0488985535e693eb8c469b70cdedf74 100644 (file)
@@ -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;