1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 00:43:25 +08:00

Add safety against pushing to non-current screen

This commit is contained in:
Dean Herbert 2021-08-05 14:00:16 +09:00
parent c84bd2c74d
commit fd54487186
2 changed files with 10 additions and 2 deletions

View File

@ -49,7 +49,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = 40, Height = 40,
Text = "Select beatmap", Text = "Select beatmap",
Action = () => matchSubScreen.Push(new MultiplayerMatchSongSelect()), Action = () =>
{
if (matchSubScreen.IsCurrentScreen())
matchSubScreen.Push(new MultiplayerMatchSongSelect());
},
Alpha = 0 Alpha = 0
} }
} }

View File

@ -230,7 +230,11 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
settingsOverlay = new PlaylistsMatchSettingsOverlay settingsOverlay = new PlaylistsMatchSettingsOverlay
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
EditPlaylist = () => this.Push(new PlaylistsSongSelect()), EditPlaylist = () =>
{
if (this.IsCurrentScreen())
this.Push(new PlaylistsSongSelect());
},
State = { Value = roomId.Value == null ? Visibility.Visible : Visibility.Hidden } State = { Value = roomId.Value == null ? Visibility.Visible : Visibility.Hidden }
} }
}); });