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:
parent
c199b8fcb6
commit
621f746789
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user