mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix UI exception for custom flight plans.
(cherry picked from commit 1848338ef7b5020593e578694589fb7a3a74ad2f)
This commit is contained in:
parent
ff0446cc12
commit
25b72e1af4
@ -76,6 +76,9 @@ class QFlightWaypointList(QTableView):
|
||||
|
||||
def takeoff_text(self, flight: Flight) -> str:
|
||||
estimator = TotEstimator(self.package)
|
||||
start_time = timedelta(seconds=int(
|
||||
estimator.takeoff_time_for_flight(flight).total_seconds()))
|
||||
takeoff_time = estimator.takeoff_time_for_flight(flight)
|
||||
# Handle custom flight plans where we can't estimate the takeoff time.
|
||||
if takeoff_time is None:
|
||||
takeoff_time = timedelta()
|
||||
start_time = timedelta(seconds=int(takeoff_time.total_seconds()))
|
||||
return f"T+{start_time}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user