Fix off-by-one error in livery selector.

This commit is contained in:
Dan Albert 2023-06-26 19:30:07 -07:00
parent f7b0dfc3a5
commit cc2dfa5d35
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@ Saves from 8.0.0 are compatible with 8.1.0
## Fixes
* **[Campaign]** Fixed liveries for premade squadrons all being off-by-one.
* **[UI]** Fixed numbering of waypoints in the map and flight dialog (first waypoint is now 0 rather than 1).
# 8.0.0

View File

@ -24,7 +24,8 @@ class LiverySelector(QComboBox):
for idx, livery in enumerate(
squadron.aircraft.dcs_unit_type.iter_liveries_for_country(
dcs.countries.get_by_name(squadron.country)
)
),
1, # First entry is "Default".
):
self.addItem(livery.name, livery)
if squadron.livery == livery.id: