mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix error displaying flight edit dialog.
If no airfield was selected (as sometimes happens, usually when there are no aircraft available anywhere), report that no aircraft are available.
This commit is contained in:
@@ -43,5 +43,7 @@ class QOriginAirfieldSelector(QComboBox):
|
||||
@property
|
||||
def available(self) -> int:
|
||||
origin = self.currentData()
|
||||
if origin is None:
|
||||
return 0
|
||||
inventory = self.global_inventory.for_control_point(origin)
|
||||
return inventory.available(self.aircraft)
|
||||
|
||||
Reference in New Issue
Block a user