mirror of https://github.com/ppy/osu
Fix intermittent failure in certain beatmap carousel tests
This commit is contained in:
parent
b3d4da8fc9
commit
112cf403ec
|
@ -21,6 +21,8 @@ public partial class SetPanelContent : CompositeDrawable
|
|||
|
||||
private readonly CarouselBeatmapSet carouselSet;
|
||||
|
||||
private FillFlowContainer<DifficultyIcon> iconFlow = null!;
|
||||
|
||||
public SetPanelContent(CarouselBeatmapSet carouselSet)
|
||||
{
|
||||
this.carouselSet = carouselSet;
|
||||
|
@ -82,13 +84,12 @@ private void load()
|
|||
TextPadding = new MarginPadding { Horizontal = 8, Vertical = 2 },
|
||||
Status = beatmapSet.Status
|
||||
},
|
||||
new FillFlowContainer<DifficultyIcon>
|
||||
iconFlow = new FillFlowContainer<DifficultyIcon>
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Spacing = new Vector2(3),
|
||||
ChildrenEnumerable = getDifficultyIcons(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -96,6 +97,12 @@ private void load()
|
|||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
iconFlow.ChildrenEnumerable = getDifficultyIcons();
|
||||
}
|
||||
|
||||
private const int maximum_difficulty_icons = 18;
|
||||
|
||||
private IEnumerable<DifficultyIcon> getDifficultyIcons()
|
||||
|
|
Loading…
Reference in New Issue