1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-16 05:37:19 +08:00

Fix cached property being assigned twice

This commit is contained in:
Bartłomiej Dach 2021-09-04 19:52:42 +02:00
parent 565f147a5c
commit 1a90fb1ef3
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -11,7 +11,7 @@ namespace osu.Game.Screens.Edit.Setup
public class SetupScreen : EditorRoundedScreen
{
[Cached]
private SectionsContainer<SetupSection> sections = new SectionsContainer<SetupSection>();
private SectionsContainer<SetupSection> sections { get; } = new SetupScreenSectionsContainer();
[Cached]
private SetupScreenHeader header = new SetupScreenHeader();
@ -37,15 +37,12 @@ namespace osu.Game.Screens.Edit.Setup
if (rulesetSpecificSection != null)
sectionsEnumerable.Add(rulesetSpecificSection);
AddRange(new Drawable[]
Add(sections.With(s =>
{
sections = new SetupScreenSectionsContainer
{
RelativeSizeAxes = Axes.Both,
ChildrenEnumerable = sectionsEnumerable,
FixedHeader = header
},
});
s.RelativeSizeAxes = Axes.Both;
s.ChildrenEnumerable = sectionsEnumerable;
s.FixedHeader = header;
}));
}
private class SetupScreenSectionsContainer : SectionsContainer<SetupSection>