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:
@@ -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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user