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.
This commit is contained in:
Pieter-Jan Briers 2024-02-20 14:01:28 +01:00 committed by GitHub
parent bd40c0ce26
commit 84d455b9f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View 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;