mirror of
https://github.com/osukey/osukey.git
synced 2025-06-17 01:08:00 +09:00
Fix editor still playing back sound when exiting with confirmation
This commit is contained in:
parent
be2b4e68b9
commit
c27e5d1216
@ -63,9 +63,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
public override bool? AllowTrackAdjustments => false;
|
public override bool? AllowTrackAdjustments => false;
|
||||||
|
|
||||||
protected override bool PlayExitSound => !HasUnsavedChanges && !isChangingDifficulties;
|
protected override bool PlayExitSound => !ExitConfirmed && !switchingDifficulty;
|
||||||
|
|
||||||
private bool isChangingDifficulties;
|
|
||||||
|
|
||||||
protected bool HasUnsavedChanges
|
protected bool HasUnsavedChanges
|
||||||
{
|
{
|
||||||
@ -103,6 +101,8 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
protected bool ExitConfirmed { get; private set; }
|
protected bool ExitConfirmed { get; private set; }
|
||||||
|
|
||||||
|
private bool switchingDifficulty;
|
||||||
|
|
||||||
private string lastSavedHash;
|
private string lastSavedHash;
|
||||||
|
|
||||||
private Container<EditorScreen> screenContainer;
|
private Container<EditorScreen> screenContainer;
|
||||||
@ -862,7 +862,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
private void switchToNewDifficulty(RulesetInfo rulesetInfo, bool createCopy)
|
private void switchToNewDifficulty(RulesetInfo rulesetInfo, bool createCopy)
|
||||||
{
|
{
|
||||||
isChangingDifficulties = true;
|
switchingDifficulty = true;
|
||||||
loader?.ScheduleSwitchToNewDifficulty(editorBeatmap.BeatmapInfo, rulesetInfo, createCopy, GetState(rulesetInfo));
|
loader?.ScheduleSwitchToNewDifficulty(editorBeatmap.BeatmapInfo, rulesetInfo, createCopy, GetState(rulesetInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user