Fix Compose not binding to the editor's beat divisor

This commit is contained in:
smoogipoo 2018-04-06 18:22:24 +09:00
parent 248be8e35f
commit 9e8490735f
2 changed files with 6 additions and 8 deletions

View File

@ -52,6 +52,7 @@ private void load(OsuColour colours)
dependencies.CacheAs<IFrameBasedClock>(clock);
dependencies.CacheAs<IAdjustableClock>(clock);
dependencies.Cache(beatDivisor);
EditorMenuBar menuBar;
TimeInfoContainer timeInfo;

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using JetBrains.Annotations;
using osu.Framework.Allocation;
using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
@ -21,15 +22,11 @@ public class Compose : EditorScreen
private Container composerContainer;
private DependencyContainer dependencies;
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent)
=> dependencies = new DependencyContainer(parent);
[BackgroundDependencyLoader]
private void load()
[BackgroundDependencyLoader(true)]
private void load([CanBeNull] BindableBeatDivisor beatDivisor)
{
dependencies.Cache(beatDivisor);
if (beatDivisor != null)
this.beatDivisor.BindTo(beatDivisor);
ScrollableTimeline timeline;
Children = new Drawable[]