Fix old maps not getting cleared when switching matches

This commit is contained in:
Dean Herbert 2018-11-08 20:14:50 +09:00
parent 6ff29c1ea4
commit ee6263f395
1 changed files with 11 additions and 6 deletions

View File

@ -180,12 +180,17 @@ private void addForBeatmap(int beatmapId)
private void matchChanged(MatchPairing match)
{
foreach (var b in match.Grouping.Value.Beatmaps)
maps.Add(new TournamentBeatmapPanel(b.BeatmapInfo)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
});
maps.Clear();
if (match.Grouping.Value != null)
{
foreach (var b in match.Grouping.Value.Beatmaps)
maps.Add(new TournamentBeatmapPanel(b.BeatmapInfo)
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
});
}
}
}
}