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

Use SingleOrDefault

This commit is contained in:
Dean Herbert 2020-09-25 12:20:37 +09:00
parent 90c4c172bf
commit 44a6637c36

View File

@ -518,7 +518,7 @@ namespace osu.Game.Screens.Edit
.ScaleTo(0.98f, 200, Easing.OutQuint)
.FadeOut(200, Easing.OutQuint);
if ((currentScreen = screenContainer.FirstOrDefault(s => s.Type == e.NewValue)) != null)
if ((currentScreen = screenContainer.SingleOrDefault(s => s.Type == e.NewValue)) != null)
{
screenContainer.ChangeChildDepth(currentScreen, lastScreen?.Depth + 1 ?? 0);