mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Fix tooltips for scuds/silkworms.
Same problem as the ground object menu, same cleanup required at some point.
This commit is contained in:
parent
933517055e
commit
d3be732566
@ -226,7 +226,12 @@ class GroundObjectJs(QObject):
|
||||
if dcs_unit_type is not None:
|
||||
# TODO: Make the TGO contain GroundUnitType instead of the pydcs Group.
|
||||
# This is a hack because we can't know which variant was used.
|
||||
unit_display_name = next(GroundUnitType.for_dcs_type(dcs_unit_type)).name
|
||||
try:
|
||||
unit_display_name = next(
|
||||
GroundUnitType.for_dcs_type(dcs_unit_type)
|
||||
).name
|
||||
except StopIteration:
|
||||
pass
|
||||
return f"Unit #{unit.id} - {unit_display_name}{dead_label}"
|
||||
|
||||
@Property(list, notify=unitsChanged)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user