set a new start time of the race in the timeslider if we get a good calculation from the leg times retreival

This commit is contained in:
fmittag committed 2012-02-08 17:51:22 +01:00
1 parent 7176393039
commit c7e9900bc3
1 file changed
+7 -1
@@ -239,8 +239,14 @@ public class RaceBoardPanel extends FormPanel implements EventDisplayer, RaceSel
@Override
public void onSuccess(RaceTimesInfoDTO racesTimesInfo) {
timePanel.setLegMarkers(racesTimesInfo.getLegTimes());
if (racesTimesInfo.getStartOfRace() != null)
if (racesTimesInfo.getStartOfRace() != null) {
// set the new start time
Date startOfRace = racesTimesInfo.getStartOfRace();
Date startOfTimeslider = new Date(startOfRace.getTime() - 5 * 60 * 1000);
timePanel.changeMin(startOfTimeslider);
timer.setTime(racesTimesInfo.getStartOfRace().getTime());
}
}
});
}