1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-04 09:03:54 +08:00

Merge pull request #32340 from peppy/fix-beatmap-creation-abort

Fix default beatmap not being correctly set after aborting new beatmap creation
This commit is contained in:
Bartłomiej Dach
2025-03-12 10:29:00 +01:00
committed by GitHub
Unverified
2 changed files with 3 additions and 1 deletions
@@ -94,6 +94,8 @@ namespace osu.Game.Tests.Visual.Editing
AddStep("release", () => InputManager.ReleaseButton(MouseButton.Left));
AddAssert("new beatmap not persisted", () => beatmapManager.QueryBeatmapSet(s => s.ID == editorBeatmap.BeatmapInfo.BeatmapSet.AsNonNull().ID)?.Value.DeletePending == true);
AddUntilStep("wait for default beatmap", () => Editor.Beatmap.Value is DummyWorkingBeatmap);
}
[Test]
+1 -1
View File
@@ -89,7 +89,7 @@ namespace osu.Game.Beatmaps
public virtual WorkingBeatmap GetWorkingBeatmap([CanBeNull] BeatmapInfo beatmapInfo)
{
if (beatmapInfo?.BeatmapSet == null)
if (beatmapInfo == null || ReferenceEquals(beatmapInfo, DefaultBeatmap.BeatmapInfo))
return DefaultBeatmap;
lock (workingCache)