MarkRoundingSequence now stores data using the leg number, rather than the leg object itself. This was an issue as leg objects would be recreated when race xml files are received.

Fixes issue #64
main
fjc40 8 years ago
parent 75f8231bc5
commit e77208aea1

@ -17,8 +17,9 @@ public class MarkRoundingSequence {
/**
* For each leg, mark rounding information.
* Maps between leg number and rounding data.
*/
private Map<Leg, MarkRoundingData> roundingPoints;
private Map<Integer, MarkRoundingData> roundingPoints;
@ -34,7 +35,7 @@ public class MarkRoundingSequence {
* @return Rounding points for leg.
*/
public MarkRoundingData getRoundingData(Leg leg) {
return roundingPoints.get(leg);
return roundingPoints.get(leg.getLegNumber());
}
@ -139,7 +140,7 @@ public class MarkRoundingSequence {
roundingData.setRoundCheck2Halfway(roundCheck2Halfway);
this.roundingPoints.put(currentLeg, roundingData);
this.roundingPoints.put(currentLeg.getLegNumber(), roundingData);
//Rounding points:

Loading…
Cancel
Save