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