From 296e6e8e8f3f4421e2767cbdaea10d5f3d4ec335 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 17 Dec 2020 16:21:31 -0800 Subject: [PATCH] Fix adding custom waypoints. Fixes https://github.com/Khopa/dcs_liberation/issues/604 --- changelog.md | 5 +++++ .../windows/mission/flight/waypoints/QFlightWaypointTab.py | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index d919e094..28a122b1 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +# 2.3.2 + +## Fixes: +* **[Flight Planner]** Fix creation of custom waypoints. + # 2.3.1 ## Features/Improvements diff --git a/qt_ui/windows/mission/flight/waypoints/QFlightWaypointTab.py b/qt_ui/windows/mission/flight/waypoints/QFlightWaypointTab.py index 3795bf1e..92145a1c 100644 --- a/qt_ui/windows/mission/flight/waypoints/QFlightWaypointTab.py +++ b/qt_ui/windows/mission/flight/waypoints/QFlightWaypointTab.py @@ -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()