1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:07:52 +08:00

Allow editor change handler to be null

This commit is contained in:
Bartłomiej Dach 2020-12-01 20:08:31 +01:00
parent 190c6ef45e
commit 94a8784e04

View File

@ -25,7 +25,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
[Resolved]
private BindableBeatDivisor beatDivisor { get; set; }
[Resolved]
[Resolved(CanBeNull = true)]
private IEditorChangeHandler changeHandler { get; set; }
[Resolved]
@ -43,8 +43,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{
beatDivisor.BindValueChanged(_ => invalidateTicks());
// currently this is the best way to handle any kind of timing changes.
changeHandler.OnStateChange += invalidateTicks;
if (changeHandler != null)
// currently this is the best way to handle any kind of timing changes.
changeHandler.OnStateChange += invalidateTicks;
}
private void invalidateTicks()