mirror of
https://github.com/ppy/osu
synced 2024-12-17 12:25:19 +00:00
Add missing change handler to ensure undo/redo works for break removal
This commit is contained in:
parent
abfdf90b54
commit
b6dc483fc1
@ -15,6 +15,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
[Resolved]
|
||||
private Timeline timeline { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private IEditorChangeHandler editorChangeHandler { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// The visible time/position range of the timeline.
|
||||
/// </summary>
|
||||
@ -73,7 +76,12 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
|
||||
Add(new TimelineBreak(breakPeriod)
|
||||
{
|
||||
OnDeleted = b => breaks.Remove(b),
|
||||
OnDeleted = b =>
|
||||
{
|
||||
editorChangeHandler.BeginChange();
|
||||
breaks.Remove(b);
|
||||
editorChangeHandler.EndChange();
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user