1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-02 16:20:30 +08:00

Small clean up

This commit is contained in:
Terochi
2023-02-22 07:48:43 +01:00
Unverified
parent 82b07d19f8
commit e321536acc
+2 -7
View File
@@ -626,17 +626,12 @@ namespace osu.Game
return;
}
//DeepCloning collection, because emptying SelectedMods resets all SettingSources Bindables to their default value
var previouslySelectedMods = SelectedMods.Value.Select(mod => mod.DeepClone()).ToArray();
if (!SelectedMods.Disabled)
SelectedMods.Value = Array.Empty<Mod>();
AvailableMods.Value = dict;
if (!SelectedMods.Disabled)
{
SelectedMods.Value = previouslySelectedMods.Select(oldMod =>
//converting mods from one ruleset to the other, while also keeping their shared settings unchanged
SelectedMods.Value = SelectedMods.Value.Select(oldMod =>
{
Mod newMod = instance.CreateModFromAcronym(oldMod.Acronym);