fixed bug from merge where est time to next mark was null on some boats #story[923]

This commit is contained in:
Peter Galloway
2017-05-22 15:01:04 +12:00
parent e0750f5341
commit 0367805f0f
2 changed files with 9 additions and 6 deletions
+7 -4
View File
@@ -217,11 +217,14 @@ public class BoatGroup extends Group{
if (estTimeToNextMarkObject == null){
estTimeToNextMarkObject = getTextObject("", textColor);
}
DateFormat format = new SimpleDateFormat("mm:ss");
String timeToNextMark = format
if (boat.getEstimateTimeAtNextMark() != null){
DateFormat format = new SimpleDateFormat("mm:ss");
String timeToNextMark = format
.format(boat.getEstimateTimeAtNextMark() - StreamParser.getCurrentTimeLong());
estTimeToNextMarkObject.setText("Next mark: " + timeToNextMark);
estTimeToNextMarkObject.setText("Next mark: " + timeToNextMark);
} else {
estTimeToNextMarkObject.setText("Next mark: -");
}
}
/**