1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 00:42:55 +08:00

Do not modify selected mods through panel state change during external update

This commit is contained in:
Bartłomiej Dach 2022-05-06 21:46:56 +02:00
parent c199b8fcb6
commit 621f746789
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -330,14 +330,16 @@ namespace osu.Game.Overlays.Mods
private void panelStateChanged(ModPanel panel)
{
if (externalSelectionUpdateInProgress)
return;
var newSelectedMods = panel.Active.Value
? SelectedMods.Append(panel.Mod)
: SelectedMods.Except(panel.Mod.Yield());
SelectedMods = newSelectedMods.ToArray();
updateState();
if (!externalSelectionUpdateInProgress)
SelectionChangedByUser?.Invoke();
SelectionChangedByUser?.Invoke();
}
/// <summary>