Fix altering negative TOT offsets.

https://github.com/dcs-liberation/dcs_liberation/issues/3107
This commit is contained in:
Dan Albert 2023-07-23 10:56:57 -07:00 committed by Raffson
parent 2ab456b9c1
commit 091d523516
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 4 additions and 2 deletions

View File

@ -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. * **[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 deleting waypoints in custom flight plans deleting the wrong waypoint.
* **[UI]** Fixed flight properties UI to support F-15E S4+ laser codes. * **[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 # 8.1.0

View File

@ -122,11 +122,12 @@ class FlightPlanPropertiesGroup(QGroupBox):
) )
def set_tot_offset(self, offset: QTime) -> None: 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() hours=offset.hour(), minutes=offset.minute(), seconds=offset.second()
) )
if self.negative_offset_checkbox.isChecked(): if self.negative_offset_checkbox.isChecked():
return self.toggle_negative_offset() offset = -offset
self.flight.flight_plan.tot_offset = offset
self.update_departure_time() self.update_departure_time()
def toggle_negative_offset(self) -> None: def toggle_negative_offset(self) -> None: