Fix editor still playing back sound when exiting with confirmation

This commit is contained in:
Dean Herbert 2022-06-15 18:44:02 +09:00
parent be2b4e68b9
commit c27e5d1216
1 changed files with 4 additions and 4 deletions

View File

@ -63,9 +63,7 @@ public class Editor : ScreenWithBeatmapBackground, IKeyBindingHandler<GlobalActi
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 @@ protected bool HasUnsavedChanges
protected bool ExitConfirmed { get; private set; }
private bool switchingDifficulty;
private string lastSavedHash;
private Container<EditorScreen> screenContainer;
@ -862,7 +862,7 @@ protected void CreateNewDifficulty(RulesetInfo rulesetInfo)
private void switchToNewDifficulty(RulesetInfo rulesetInfo, bool createCopy)
{
isChangingDifficulties = true;
switchingDifficulty = true;
loader?.ScheduleSwitchToNewDifficulty(editorBeatmap.BeatmapInfo, rulesetInfo, createCopy, GetState(rulesetInfo));
}