From 8907ce3f6300d558ad5490eadf7ee53e0e0df719 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 14 Dec 2018 18:11:04 +0900 Subject: [PATCH] Automatically fix invalid pairing dates on load (based on contained groupings) --- osu.Game.Tournament/TournamentGameBase.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osu.Game.Tournament/TournamentGameBase.cs b/osu.Game.Tournament/TournamentGameBase.cs index 4938533a9e..5c9bee560e 100644 --- a/osu.Game.Tournament/TournamentGameBase.cs +++ b/osu.Game.Tournament/TournamentGameBase.cs @@ -109,7 +109,12 @@ private void load(Storage storage, FrameworkConfigManager frameworkConfig) foreach (var id in group.Pairings) { var found = Ladder.Pairings.FirstOrDefault(p => p.ID == id); - if (found != null) found.Grouping.Value = group; + if (found != null) + { + found.Grouping.Value = group; + if (group.StartDate.Value > found.Date.Value) + found.Date.Value = group.StartDate.Value; + } } Ladder.CurrentMatch.Value = Ladder.Pairings.FirstOrDefault(p => p.Current.Value);