mirror of
https://github.com/ppy/osu.git
synced 2025-02-27 17:32:55 +08:00
Reset panel mod instance settings to defaults on deselect
This commit is contained in:
parent
7c04bf5c53
commit
f91ee4b042
@ -309,8 +309,10 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
var matchingSelectedMod = SelectedMods.Value.SingleOrDefault(selected => selected.GetType() == panel.Mod.GetType());
|
||||
panel.Active.Value = matchingSelectedMod != null;
|
||||
if (matchingSelectedMod != null)
|
||||
if (panel.Active.Value)
|
||||
panel.Mod.CopyFrom(matchingSelectedMod);
|
||||
else
|
||||
panel.Mod.ResetSettingsToDefaults();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user