Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix editor playing object samples while paused after cancelling exit #19063

Merged
merged 3 commits into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions osu.Game.Tests/Visual/Editing/TestSceneEditorSaving.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class TestSceneEditorSaving : EditorSavingTestScene
public void TestCantExitWithoutSaving()
{
AddRepeatStep("Exit", () => InputManager.Key(Key.Escape), 10);
AddAssert("Sample playback disabled", () => Editor.SamplePlaybackDisabled.Value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still passes on master. Please make sure to check tests actually fail without the fix.

AddAssert("Editor is still active screen", () => Game.ScreenStack.CurrentScreen is Editor);
}

Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Edit/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ private EditorMenuItem createDifficultySwitchMenu()

private void cancelExit()
{
samplePlaybackDisabled.Value = false;
updateSampleDisabledState();
loader?.CancelPendingDifficultySwitch();
}

Expand Down