1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

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

View File

@ -63,7 +63,9 @@ namespace osu.Game.Screens.Edit
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 @@ namespace osu.Game.Screens.Edit
}
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()
{