mirror of https://github.com/ppy/osu
Fix editor still playing back sound when exiting with confirmation
This commit is contained in:
parent
be2b4e68b9
commit
c27e5d1216
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue