Round waypoint TOTs in the UI.

This commit is contained in:
Dan Albert 2020-11-05 14:28:16 -08:00
parent bbb6251aa9
commit de3ba5908f
2 changed files with 3 additions and 0 deletions

View File

@ -349,6 +349,7 @@ class QLiberationMap(QGraphicsView):
if time is None:
tot = ""
else:
time = datetime.timedelta(seconds=int(time.total_seconds()))
tot = f"{prefix} T+{time}"
pen = QPen(QColor("black"), 0.3)

View File

@ -1,4 +1,5 @@
import itertools
from datetime import timedelta
from PySide2.QtCore import QItemSelectionModel, QPoint
from PySide2.QtGui import QStandardItem, QStandardItemModel
@ -81,4 +82,5 @@ class QFlightWaypointList(QTableView):
time = flight.flight_plan.depart_time_for_waypoint(waypoint)
if time is None:
return ""
time = timedelta(seconds=int(time.total_seconds()))
return f"{prefix}T+{time}"