Skip to content

Commit

Permalink
Change SkinProvidingContainer to also return parent sources in `All…
Browse files Browse the repository at this point in the history
…Sources`
  • Loading branch information
peppy committed Sep 30, 2024
1 parent d2b855d commit c62cbb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Osu.Tests/TestSceneSkinFallbacks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public Drawable GetDrawableComponent(ISkinComponentLookup lookup)

public ISkin FindProvider(Func<ISkin, bool> lookupFunction) => lookupFunction(this) ? this : null;

public IEnumerable<ISkin> AllSources => new[] { this };
public IEnumerable<ISkin> AllSources => Array.Empty<ISkin>();

[CanBeNull]
public event Action SourceChanged;
Expand Down
5 changes: 1 addition & 4 deletions osu.Game/Skinning/SkinProvidingContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ public IEnumerable<ISkin> AllSources
yield return i.skin;

if (ParentSource != null)
{
foreach (var skin in ParentSource.AllSources)
yield return skin;
}
yield return ParentSource;
}
}

Expand Down

0 comments on commit c62cbb0

Please sign in to comment.