diff --git a/osu.Game/Screens/Edit/Editor.cs b/osu.Game/Screens/Edit/Editor.cs index 4e35f3c34e..6c30413d8c 100644 --- a/osu.Game/Screens/Edit/Editor.cs +++ b/osu.Game/Screens/Edit/Editor.cs @@ -63,7 +63,9 @@ public class Editor : ScreenWithBeatmapBackground, IKeyBindingHandler false; - protected override bool PlayExitSound => !HasUnsavedChanges; + protected override bool PlayExitSound => !HasUnsavedChanges && !isChangingDifficulties; + + private bool isChangingDifficulties; protected bool HasUnsavedChanges { @@ -859,7 +861,10 @@ protected void CreateNewDifficulty(RulesetInfo rulesetInfo) } private void switchToNewDifficulty(RulesetInfo rulesetInfo, bool createCopy) - => loader?.ScheduleSwitchToNewDifficulty(editorBeatmap.BeatmapInfo, rulesetInfo, createCopy, GetState(rulesetInfo)); + { + isChangingDifficulties = true; + loader?.ScheduleSwitchToNewDifficulty(editorBeatmap.BeatmapInfo, rulesetInfo, createCopy, GetState(rulesetInfo)); + } private EditorMenuItem createDifficultySwitchMenu() {