From c27e5d1216e7be5f9c149b58e0ff9e42a5206aa4 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 15 Jun 2022 18:44:02 +0900 Subject: [PATCH] Fix editor still playing back sound when exiting with confirmation --- osu.Game/Screens/Edit/Editor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)); }