Fix mods not correctly resetting when changing ruleset at song select

This commit is contained in:
Dean Herbert
2018-07-04 12:40:55 +09:00
parent b02603000e
commit e28a610757
7 changed files with 46 additions and 21 deletions

View File

@ -44,6 +44,8 @@ namespace osu.Game.Overlays.Mods
private void rulesetChanged(RulesetInfo newRuleset)
{
if (newRuleset == null) return;
var instance = newRuleset.CreateInstance();
foreach (ModSection section in ModSectionsContainer.Children)
@ -173,7 +175,10 @@ namespace osu.Game.Overlays.Mods
refreshSelectedMods();
}
private void refreshSelectedMods() => SelectedMods.Value = ModSectionsContainer.Children.SelectMany(s => s.SelectedMods).ToArray();
private void refreshSelectedMods()
{
SelectedMods.Value = ModSectionsContainer.Children.SelectMany(s => s.SelectedMods).ToArray();
}
public ModSelectOverlay()
{