mirror of
https://github.com/ppy/osu
synced 2025-01-19 12:30:50 +00:00
Merge pull request #19063 from Joehuu/fix-samples-cancel-exit
Fix editor playing object samples while paused after cancelling exit
This commit is contained in:
commit
3ca10ac02c
@ -6,11 +6,13 @@
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Screens.Edit;
|
||||
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||
using osu.Game.Screens.Select;
|
||||
@ -23,7 +25,9 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
[Test]
|
||||
public void TestCantExitWithoutSaving()
|
||||
{
|
||||
AddUntilStep("Wait for dialog overlay load", () => ((Drawable)Game.Dependencies.Get<IDialogOverlay>()).IsLoaded);
|
||||
AddRepeatStep("Exit", () => InputManager.Key(Key.Escape), 10);
|
||||
AddAssert("Sample playback disabled", () => Editor.SamplePlaybackDisabled.Value);
|
||||
AddAssert("Editor is still active screen", () => Game.ScreenStack.CurrentScreen is Editor);
|
||||
}
|
||||
|
||||
|
@ -921,7 +921,7 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
private void cancelExit()
|
||||
{
|
||||
samplePlaybackDisabled.Value = false;
|
||||
updateSampleDisabledState();
|
||||
loader?.CancelPendingDifficultySwitch();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user