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

Ensure callbacks don't fire when restoring default beatmap

This commit is contained in:
Bartłomiej Dach 2020-11-07 20:31:44 +01:00
parent 16f55de495
commit e078b78dcc

View File

@ -499,6 +499,9 @@ namespace osu.Game.Screens.Edit
// confirming exit without save means we should delete the new beatmap completely.
beatmapManager.Delete(playableBeatmap.BeatmapInfo.BeatmapSet);
// eagerly clear contents before restoring default beatmap to prevent value change callbacks from firing.
ClearInternal();
// in theory this shouldn't be required but due to EF core not sharing instance states 100%
// MusicController is unaware of the changed DeletePending state.
Beatmap.SetDefault();