mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Invalidate squadron livery if not found or incompatible
This commit is contained in:
parent
aa26a2fa79
commit
d44218ba55
@ -39,6 +39,12 @@ class SquadronLiverySelector(QComboBox):
|
||||
for x in faction.liveries_overrides.get(self.aircraft_type, [])
|
||||
if x in [y.id.lower() for y in liveries]
|
||||
]
|
||||
if selected_livery and selected_livery.lower() not in [
|
||||
livery.id.lower() for livery in liveries
|
||||
]:
|
||||
# squadron livery not found, or incompatible with faction
|
||||
# => attempt to use the unit's default-livery as a fallback
|
||||
selected_livery = None
|
||||
if squadron.livery_set:
|
||||
self.addItem(LIVERY_SET_TEXT, userData=None)
|
||||
if len(overrides) > 0:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user