Don't play editor exit sound when changing difficulties

This commit is contained in:
Dean Herbert 2022-06-15 17:49:09 +09:00
parent fd4529aa7c
commit 713cff3403
1 changed files with 7 additions and 2 deletions

View File

@ -63,7 +63,9 @@ public class Editor : ScreenWithBeatmapBackground, IKeyBindingHandler<GlobalActi
public override bool? AllowTrackAdjustments => 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()
{