Fix adding custom waypoints.

Fixes https://github.com/Khopa/dcs_liberation/issues/604
This commit is contained in:
Dan Albert 2020-12-17 16:21:31 -08:00
parent 23a0846533
commit 296e6e8e8f
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
# 2.3.2
## Fixes:
* **[Flight Planner]** Fix creation of custom waypoints.
# 2.3.1
## Features/Improvements

View File

@ -116,7 +116,8 @@ class QFlightWaypointTab(QFrame):
if not waypoints:
return
self.degrade_to_custom_flight_plan()
self.flight.flight_plan.waypoints.extend(waypoints)
assert isinstance(self.flight.flight_plan, CustomFlightPlan)
self.flight.flight_plan.custom_waypoints.extend(waypoints)
self.flight_waypoint_list.update_list()
self.on_change()
@ -124,7 +125,8 @@ class QFlightWaypointTab(QFrame):
rtb = self.planner.generate_rtb_waypoint(self.flight,
self.flight.from_cp)
self.degrade_to_custom_flight_plan()
self.flight.flight_plan.waypoints.append(rtb)
assert isinstance(self.flight.flight_plan, CustomFlightPlan)
self.flight.flight_plan.custom_waypoints.append(rtb)
self.flight_waypoint_list.update_list()
self.on_change()