mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-21 21:25:38 +00:00
bug6064: fixed computing leg rank, using TrackedLegOfCompetitor.getRank();
this way, asking in a leg for exactly the leg finishing time is not answered by the next let but the leg just finished. This is required to make the result consistent with what we show in the leaderboard
This commit is contained in:
+2
-4
@@ -247,8 +247,7 @@ public abstract class AbstractTrackedLegSliceOfCompetitorWithContext implements
|
||||
final Integer result;
|
||||
if (getTrackedLegContext().getTrackedRaceContext().getTrackedRace() != null) {
|
||||
if (!isRankAtSliceStartInitialized) {
|
||||
TrackedRace trackedRace = getTrackedLegContext().getTrackedRaceContext().getTrackedRace();
|
||||
int rank = trackedRace.getRank(getCompetitor(), getSliceStartTime());
|
||||
int rank = getTrackedLegOfCompetitor().getRank(getSliceStartTime());
|
||||
rankAtSliceStart = rank == 0 ? null : rank;
|
||||
isRankAtSliceStartInitialized = true;
|
||||
}
|
||||
@@ -340,8 +339,7 @@ public abstract class AbstractTrackedLegSliceOfCompetitorWithContext implements
|
||||
|
||||
public Integer getRankAtSliceFinish() {
|
||||
if (!isRankAtSliceFinishInitialized) {
|
||||
TrackedRace trackedRace = getTrackedLegContext().getTrackedRaceContext().getTrackedRace();
|
||||
int rank = trackedRace.getRank(getCompetitor(), getSliceFinishTime());
|
||||
int rank = getTrackedLegOfCompetitor().getRank(getSliceFinishTime());
|
||||
rankAtSliceFinish = rank == 0 ? null : rank;
|
||||
isRankAtSliceFinishInitialized = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user