Fix selection not being preserved when IsValidMod changes

This commit is contained in:
smoogipoo
2021-02-02 20:50:54 +09:00
parent 10ceddf3ff
commit 50e92bd0ed
3 changed files with 23 additions and 6 deletions

View File

@ -130,13 +130,13 @@ namespace osu.Game.Overlays.Mods
/// Updates all buttons with the given list of selected mods.
/// </summary>
/// <param name="newSelectedMods">The new list of selected mods to select.</param>
public void UpdateSelectedMods(IReadOnlyList<Mod> newSelectedMods)
public void UpdateSelectedButtons(IReadOnlyList<Mod> newSelectedMods)
{
foreach (var button in buttons)
updateButtonMods(button, newSelectedMods);
updateButtonSelection(button, newSelectedMods);
}
private void updateButtonMods(ModButton button, IReadOnlyList<Mod> newSelectedMods)
private void updateButtonSelection(ModButton button, IReadOnlyList<Mod> newSelectedMods)
{
foreach (var mod in newSelectedMods)
{