mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Ensure callbacks don't fire when restoring default beatmap
This commit is contained in:
parent
16f55de495
commit
e078b78dcc
@ -499,6 +499,9 @@ namespace osu.Game.Screens.Edit
|
|||||||
// confirming exit without save means we should delete the new beatmap completely.
|
// confirming exit without save means we should delete the new beatmap completely.
|
||||||
beatmapManager.Delete(playableBeatmap.BeatmapInfo.BeatmapSet);
|
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%
|
// 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.
|
// MusicController is unaware of the changed DeletePending state.
|
||||||
Beatmap.SetDefault();
|
Beatmap.SetDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user