From 43824c2a94d9e108c7d05282b0c54af189692f4a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 3 Sep 2018 11:50:50 +0900 Subject: [PATCH] Switch back to default skin when the user selected skin is deleted --- osu.Game/Skinning/SkinManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osu.Game/Skinning/SkinManager.cs b/osu.Game/Skinning/SkinManager.cs index 91c78f80b8..74222da4a2 100644 --- a/osu.Game/Skinning/SkinManager.cs +++ b/osu.Game/Skinning/SkinManager.cs @@ -93,6 +93,12 @@ namespace osu.Game.Skinning { this.audio = audio; + ItemRemoved += removedInfo => { + // check the removed skin is not the current user choice. if it is, switch back to default. + if (removedInfo.ID == CurrentSkinInfo.Value.ID) + CurrentSkinInfo.Value = SkinInfo.Default; + }; + CurrentSkinInfo.ValueChanged += info => CurrentSkin.Value = GetSkin(info); CurrentSkin.ValueChanged += skin => {