mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:32:55 +08:00
Set beatmap to sane default on exiting editor
This commit is contained in:
parent
c86b37f60d
commit
68039cff40
@ -469,10 +469,17 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
private void confirmExit()
|
||||
{
|
||||
// stop the track if playing to allow the parent screen to choose a suitable playback mode.
|
||||
Beatmap.Value.Track.Stop();
|
||||
|
||||
if (isNewBeatmap)
|
||||
{
|
||||
// confirming exit without save means we should delete the new beatmap completely.
|
||||
beatmapManager.Delete(playableBeatmap.BeatmapInfo.BeatmapSet);
|
||||
|
||||
// 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();
|
||||
}
|
||||
|
||||
exitConfirmed = true;
|
||||
|
Loading…
Reference in New Issue
Block a user