1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:32:55 +08:00

Merge pull request #22255 from peppy/tournament-fix-save-changes-on-population

Fix tournament client not saving changes after populating new data
This commit is contained in:
Bartłomiej Dach 2023-01-17 19:46:15 +01:00 committed by GitHub
commit b27fa1beb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,7 +156,7 @@ namespace osu.Game.Tournament
addedInfo |= addSeedingBeatmaps();
if (addedInfo)
SaveChanges();
saveChanges();
ladder.CurrentMatch.Value = ladder.Matches.FirstOrDefault(p => p.Current.Value);
@ -318,6 +318,11 @@ namespace osu.Game.Tournament
return;
}
saveChanges();
}
private void saveChanges()
{
foreach (var r in ladder.Rounds)
r.Matches = ladder.Matches.Where(p => p.Round.Value == r).Select(p => p.ID).ToList();