Show arrival airfield in the flight list.

Fixes https://github.com/Khopa/dcs_liberation/issues/798.
This commit is contained in:
Dan Albert 2021-01-30 15:13:10 -08:00
parent 34d4ecd4e6
commit a078b67b36
2 changed files with 3 additions and 3 deletions

View File

@ -31,6 +31,7 @@ Saves from 2.3 are not compatible with 2.4.
* **[UI]** WIP - There is now a unit info button for each unit in the recruitment list, that should help newer players learn what each unit does.
* **[UI]** Docs for time-on-target and creating new theaters/factions/loadouts are now linked in the UI at the appropriate places.
* **[UI]** ASAP is now a checkbox rather than a button. Enabling this will disable the TOT selector but changes to the package structure will automatically re-ASAP the package.
* **[UI]** Arrival airfield is now shown in the flight list if it differs from the departure airfield.
* **[Factions]** Added option for date-based loadout restriction. Active radar homing missiles are handled, patches welcome for the other thousand weapons.
* **[Factions]** Added Poland 2010 faction.
* **[Factions]** Added Greece 2005 faction.

View File

@ -60,9 +60,6 @@ class FlightDelegate(QStyledItemDelegate):
def first_row_text(self, index: QModelIndex) -> str:
flight = self.flight(index)
task = flight.flight_type
count = flight.count
name = db.unit_type_name(flight.unit_type)
estimator = TotEstimator(self.package)
delay = estimator.mission_start_time(flight)
return f"{flight} in {delay}"
@ -70,6 +67,8 @@ class FlightDelegate(QStyledItemDelegate):
def second_row_text(self, index: QModelIndex) -> str:
flight = self.flight(index)
origin = flight.from_cp.name
if flight.arrival != flight.departure:
return f"From {origin} to {flight.arrival.name}"
return f"From {origin}"
def paint(self, painter: QPainter, option: QStyleOptionViewItem,