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:
parent
47eeab34e1
commit
2438c20d63
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user