diff --git a/osu.Game/Screens/Edit/Editor.cs b/osu.Game/Screens/Edit/Editor.cs index 6c30413d8c..1fbc1b4bd6 100644 --- a/osu.Game/Screens/Edit/Editor.cs +++ b/osu.Game/Screens/Edit/Editor.cs @@ -63,9 +63,7 @@ namespace osu.Game.Screens.Edit public override bool? AllowTrackAdjustments => false; - protected override bool PlayExitSound => !HasUnsavedChanges && !isChangingDifficulties; - - private bool isChangingDifficulties; + protected override bool PlayExitSound => !ExitConfirmed && !switchingDifficulty; protected bool HasUnsavedChanges { @@ -103,6 +101,8 @@ namespace osu.Game.Screens.Edit protected bool ExitConfirmed { get; private set; } + private bool switchingDifficulty; + private string lastSavedHash; private Container screenContainer; @@ -862,7 +862,7 @@ namespace osu.Game.Screens.Edit private void switchToNewDifficulty(RulesetInfo rulesetInfo, bool createCopy) { - isChangingDifficulties = true; + switchingDifficulty = true; loader?.ScheduleSwitchToNewDifficulty(editorBeatmap.BeatmapInfo, rulesetInfo, createCopy, GetState(rulesetInfo)); }