Move resolved usage of WorkingBeatmap in editor components as local as possible to avoid misuse

This commit is contained in:
Dean Herbert
2021-01-04 16:47:08 +09:00
parent 7fdf876b4c
commit b7dd54847f
6 changed files with 32 additions and 33 deletions

View File

@ -16,6 +16,9 @@ namespace osu.Game.Screens.Edit.Compose
{
public class ComposeScreen : EditorScreenWithTimeline
{
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; }
private HitObjectComposer composer;
public ComposeScreen()
@ -59,7 +62,7 @@ namespace osu.Game.Screens.Edit.Compose
{
Debug.Assert(ruleset != null);
var beatmapSkinProvider = new BeatmapSkinProvidingContainer(Beatmap.Value.Skin);
var beatmapSkinProvider = new BeatmapSkinProvidingContainer(beatmap.Value.Skin);
// the beatmapSkinProvider is used as the fallback source here to allow the ruleset-specific skin implementation
// full access to all skin sources.