mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Avoid resetting selection on deselecting incompatibile types
This commit is contained in:
parent
15062cc63f
commit
8f2f1a444f
@ -148,7 +148,11 @@ namespace osu.Game.Overlays.Mods
|
||||
/// <summary>
|
||||
/// Deselects all mods.
|
||||
/// </summary>
|
||||
public void DeselectAll() => DeselectTypes(buttons.Select(b => b.SelectedMod?.GetType()).Where(t => t != null));
|
||||
public void DeselectAll()
|
||||
{
|
||||
pendingSelectionOperations.Clear();
|
||||
DeselectTypes(buttons.Select(b => b.SelectedMod?.GetType()).Where(t => t != null));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deselect one or more mods in this section.
|
||||
@ -156,8 +160,6 @@ namespace osu.Game.Overlays.Mods
|
||||
/// <param name="modTypes">The types of <see cref="Mod"/>s which should be deselected.</param>
|
||||
public void DeselectTypes(IEnumerable<Type> modTypes)
|
||||
{
|
||||
pendingSelectionOperations.Clear();
|
||||
|
||||
foreach (var button in buttons)
|
||||
{
|
||||
if (button.SelectedMod == null) continue;
|
||||
|
Loading…
Reference in New Issue
Block a user