mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 18:27:26 +08:00
Fix nullability
This commit is contained in:
parent
b6dc483fc1
commit
abfcac7466
@ -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)),
|
||||
};
|
||||
|
@ -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();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user