1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Fix SourceChanged not being correctly forwarded through LegacySkinTransformer

This commit is contained in:
Dean Herbert 2021-06-09 17:56:07 +09:00
parent 47eeab34e1
commit 2438c20d63
2 changed files with 8 additions and 2 deletions

View File

@ -53,8 +53,8 @@ namespace osu.Game.Skinning
public event Action SourceChanged
{
add { throw new NotSupportedException(); }
remove { }
add => Source.SourceChanged += value;
remove => Source.SourceChanged -= value;
}
}
}

View File

@ -46,6 +46,9 @@ namespace osu.Game.Skinning
RelativeSizeAxes = Axes.Both;
noFallbackLookupProxy = new NoFallbackProxy(this);
if (skin is ISkinSource source)
source.SourceChanged += TriggerSourceChanged;
}
public ISkin FindProvider(Func<ISkin, bool> lookupFunction)
@ -168,6 +171,9 @@ namespace osu.Game.Skinning
if (fallbackSource != null)
fallbackSource.SourceChanged -= TriggerSourceChanged;
if (skin is ISkinSource source)
source.SourceChanged -= TriggerSourceChanged;
}
private class NoFallbackProxy : ISkinSource