diff --git a/changelog.md b/changelog.md index 4f7339d8..9da044bd 100644 --- a/changelog.md +++ b/changelog.md @@ -229,6 +229,7 @@ BAI/ANTISHIP/DEAD/STRIKE/BARCAP/CAS/OCA/AIR-ASSAULT (main) missions * **[Plugins]** Fixed Lua errors in Skynet plugin that would occur whenever one coalition had no IADS nodes. * **[UI]** Fixed deleting waypoints in custom flight plans deleting the wrong waypoint. * **[UI]** Fixed flight properties UI to support F-15E S4+ laser codes. +* **[UI]** Fixed UI bug where altering an "ahead of package" TOT offset would change the offset back to a "behind pacakge" offset. # 8.1.0 diff --git a/qt_ui/windows/mission/flight/settings/FlightPlanPropertiesGroup.py b/qt_ui/windows/mission/flight/settings/FlightPlanPropertiesGroup.py index 9e1c8b2d..06cbd90c 100644 --- a/qt_ui/windows/mission/flight/settings/FlightPlanPropertiesGroup.py +++ b/qt_ui/windows/mission/flight/settings/FlightPlanPropertiesGroup.py @@ -122,11 +122,12 @@ class FlightPlanPropertiesGroup(QGroupBox): ) def set_tot_offset(self, offset: QTime) -> None: - self.flight.flight_plan.tot_offset = timedelta( + offset = timedelta( hours=offset.hour(), minutes=offset.minute(), seconds=offset.second() ) if self.negative_offset_checkbox.isChecked(): - return self.toggle_negative_offset() + offset = -offset + self.flight.flight_plan.tot_offset = offset self.update_departure_time() def toggle_negative_offset(self) -> None: