mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 04:02:59 +08:00
Hook ChangeHandler to transactional events rather than individual ones
This commit is contained in:
parent
0781fbd443
commit
b2d93f799f
@ -53,9 +53,9 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
this.editorBeatmap = editorBeatmap;
|
||||
|
||||
editorBeatmap.HitObjectAdded += hitObjectAdded;
|
||||
editorBeatmap.HitObjectRemoved += hitObjectRemoved;
|
||||
editorBeatmap.HitObjectUpdated += hitObjectUpdated;
|
||||
editorBeatmap.TransactionBegan += BeginChange;
|
||||
editorBeatmap.TransactionEnded += EndChange;
|
||||
editorBeatmap.SaveStateTriggered += SaveState;
|
||||
|
||||
patcher = new LegacyEditorBeatmapPatcher(editorBeatmap);
|
||||
|
||||
@ -63,12 +63,6 @@ namespace osu.Game.Screens.Edit
|
||||
SaveState();
|
||||
}
|
||||
|
||||
private void hitObjectAdded(HitObject obj) => SaveState();
|
||||
|
||||
private void hitObjectRemoved(HitObject obj) => SaveState();
|
||||
|
||||
private void hitObjectUpdated(HitObject obj) => SaveState();
|
||||
|
||||
protected override void UpdateState()
|
||||
{
|
||||
if (isRestoring)
|
||||
|
Loading…
Reference in New Issue
Block a user