Skip to content

Commit

Permalink
When adding a new entry to the vote collection, make sure it doesn't …
Browse files Browse the repository at this point in the history
…already

exist (in the case of condensed rank votes), and that rank votes are in
condensed form when being added.
  • Loading branch information
Kinematics committed Oct 26, 2015
1 parent c7bbdac commit 0fa541f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion NetTally/MergeVotesWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,12 @@ private void merge_Click(object sender, RoutedEventArgs e)
VoteCollection.Remove(fromVote);
if (votesDiff.Count() == 1)
{
VoteCollection.Add(votesDiff.First());
string addVote = votesDiff.First();
if (CurrentVoteType == VoteType.Rank)
addVote = VoteString.CondenseRankVote(addVote);

if (!VoteCollection.Contains(addVote))
VoteCollection.Add(addVote);
}


Expand Down

0 comments on commit 0fa541f

Please sign in to comment.