Fix cases where pilots were not returned.

https://github.com/dcs-liberation/dcs_liberation/issues/276
This commit is contained in:
Dan Albert
2021-05-26 18:49:19 -07:00
parent 5277beede3
commit 8b8e018521
7 changed files with 15 additions and 1 deletions

View File

@@ -167,6 +167,7 @@ class PackageModel(QAbstractListModel):
if flight.cargo is not None:
flight.cargo.transport = None
self.game_model.game.aircraft_inventory.return_from_flight(flight)
flight.clear_roster()
self.package.remove_flight(flight)
self.endRemoveRows()
self.update_tot()
@@ -259,6 +260,7 @@ class AtoModel(QAbstractListModel):
self.ato.remove_package(package)
for flight in package.flights:
self.game.aircraft_inventory.return_from_flight(flight)
flight.clear_roster()
if flight.cargo is not None:
flight.cargo.transport = None
self.endRemoveRows()