mirror of https://github.com/ppy/osu
Fix the possibility of a double-direction progression bind
This commit is contained in:
parent
f2f4e964c5
commit
cddc7f74d4
|
@ -41,13 +41,22 @@ public MatchPairing()
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue