mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-07 04:41:00 +00:00
fixed leg ranks for non-started legs, setting to 0
This commit is contained in:
1 parent
cbe3038325
commit
0e4d77596e
1 file changed
+6
-2
+6
-2
@@ -224,8 +224,12 @@ public class TrackedLegOfCompetitorImpl implements TrackedLegOfCompetitor {
|
||||
|
||||
@Override
|
||||
public int getRank(TimePoint timePoint) {
|
||||
List<TrackedLegOfCompetitor> competitorTracksByRank = getTrackedLeg().getCompetitorTracksOrderedByRank(timePoint);
|
||||
return competitorTracksByRank.indexOf(this)+1;
|
||||
int result = 0;
|
||||
if (hasStartedLeg(timePoint)) {
|
||||
List<TrackedLegOfCompetitor> competitorTracksByRank = getTrackedLeg().getCompetitorTracksOrderedByRank(timePoint);
|
||||
result = competitorTracksByRank.indexOf(this)+1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user