1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

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

View File

@ -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<EditorScreen> 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));
}