Switch back to default skin when the user selected skin is deleted

This commit is contained in:
Dean Herbert 2018-09-03 11:50:50 +09:00
parent fb1e8fbdcf
commit 43824c2a94

View File

@ -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 =>
{