mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Merge pull request #10440 from peppy/fix-editor-song-after-exit
Fix editor playing deleted beatmap's track on exit-without-save
This commit is contained in:
@ -150,7 +150,7 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
if (IsUserPaused) return;
|
if (IsUserPaused) return;
|
||||||
|
|
||||||
if (CurrentTrack.IsDummyDevice)
|
if (CurrentTrack.IsDummyDevice || beatmap.Value.BeatmapSetInfo.DeletePending)
|
||||||
{
|
{
|
||||||
if (beatmap.Disabled)
|
if (beatmap.Disabled)
|
||||||
return;
|
return;
|
||||||
|
@ -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;
|
||||||
|
Reference in New Issue
Block a user