Use bindable for track to fix rate adjustments not applying correctly

This commit is contained in:
Dean Herbert
2020-09-24 19:01:28 +09:00
parent 978f6edf38
commit 7e7e2fd64a
3 changed files with 14 additions and 7 deletions

View File

@ -62,12 +62,12 @@ namespace osu.Game.Screens.Edit.Components
}
};
Track?.AddAdjustment(AdjustableProperty.Tempo, tempo);
Track.BindValueChanged(tr => tr.NewValue?.AddAdjustment(AdjustableProperty.Tempo, tempo), true);
}
protected override void Dispose(bool isDisposing)
{
Track?.RemoveAdjustment(AdjustableProperty.Tempo, tempo);
Track.Value?.RemoveAdjustment(AdjustableProperty.Tempo, tempo);
base.Dispose(isDisposing);
}