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

Fix the possibility of a double-direction progression bind

This commit is contained in:
Dean Herbert 2018-09-21 22:07:03 +09:00
parent f2f4e964c5
commit cddc7f74d4

View File

@ -41,13 +41,22 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
Progression.ValueChanged += progression =>
{
if (lastProgression != null)
// clear the source from the previous progression.
lastProgression.ProgressionSource.Value = null;
if (progression != null)
// set the source on the new progression.
progression.ProgressionSource.Value = this;
lastProgression = progression;
};
ProgressionSource.ValueChanged += source =>
{
if (source != null)
// ennsure no two-way progressions.
Progression.Value = null;
};
}
public MatchPairing(TournamentTeam team1 = null, TournamentTeam team2 = null)