mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 22:19:30 +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()
|
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)
|
if (isNewBeatmap)
|
||||||
{
|
{
|
||||||
// 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);
|
||||||
|
|
||||||
|
// 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;
|
exitConfirmed = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user