mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
Add safety against pushing to non-current screen
This commit is contained in:
parent
c84bd2c74d
commit
fd54487186
@ -49,7 +49,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 40,
|
||||
Text = "Select beatmap",
|
||||
Action = () => matchSubScreen.Push(new MultiplayerMatchSongSelect()),
|
||||
Action = () =>
|
||||
{
|
||||
if (matchSubScreen.IsCurrentScreen())
|
||||
matchSubScreen.Push(new MultiplayerMatchSongSelect());
|
||||
},
|
||||
Alpha = 0
|
||||
}
|
||||
}
|
||||
|
@ -230,7 +230,11 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
||||
settingsOverlay = new PlaylistsMatchSettingsOverlay
|
||||
{
|
||||
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 }
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user