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
1 changed files with 9 additions and 0 deletions

View File

@ -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)