From 132bb592030667a967425447714aa2f074d7666e Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Wed, 24 Nov 2021 19:53:21 +0900 Subject: [PATCH] Update working beatmap when returning to match --- .../Visual/Multiplayer/TestSceneAllPlayersQueueMode.cs | 7 +++++++ osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs | 1 + 2 files changed, 8 insertions(+) diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneAllPlayersQueueMode.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneAllPlayersQueueMode.cs index dcb01b83cc..aaf0a49c96 100644 --- a/osu.Game.Tests/Visual/Multiplayer/TestSceneAllPlayersQueueMode.cs +++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneAllPlayersQueueMode.cs @@ -78,6 +78,13 @@ namespace osu.Game.Tests.Visual.Multiplayer AddAssert("playlist item is not expired", () => Client.APIRoom?.Playlist[1].Expired == false); } + [Test] + public void TestCorrectItemSelectedAfterNewItemAdded() + { + addItem(() => OtherBeatmap); + AddAssert("selected beatmap is initial beatmap", () => Beatmap.Value.BeatmapInfo.OnlineID == InitialBeatmap.OnlineID); + } + private void addItem(Func beatmap) { AddStep("click edit button", () => diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs index 323d38c881..7c5ed3f5cc 100644 --- a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs @@ -302,6 +302,7 @@ namespace osu.Game.Screens.OnlinePlay.Match public override void OnResuming(IScreen last) { base.OnResuming(last); + updateWorkingBeatmap(); beginHandlingTrack(); Scheduler.AddOnce(UpdateMods); }