1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 07:32:55 +08:00

Fix nullability

This commit is contained in:
Dean Herbert 2024-07-03 15:17:00 +09:00
parent b6dc483fc1
commit abfcac7466
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -105,7 +105,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
background.FadeColour(IsHovered ? colours.Gray6 : colours.Gray5, 400, Easing.OutQuint);
}
public MenuItem[]? ContextMenuItems => new MenuItem[]
public MenuItem[] ContextMenuItems => new MenuItem[]
{
new OsuMenuItem(CommonStrings.ButtonsDelete, MenuItemType.Destructive, () => OnDeleted?.Invoke(Break.Value)),
};

View File

@ -16,7 +16,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
private Timeline timeline { get; set; } = null!;
[Resolved]
private IEditorChangeHandler editorChangeHandler { get; set; } = null!;
private IEditorChangeHandler? editorChangeHandler { get; set; }
/// <summary>
/// The visible time/position range of the timeline.
@ -78,9 +78,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{
OnDeleted = b =>
{
editorChangeHandler.BeginChange();
editorChangeHandler?.BeginChange();
breaks.Remove(b);
editorChangeHandler.EndChange();
editorChangeHandler?.EndChange();
},
});
}