mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Make squadron nicknames optional.
(cherry picked from commit 25c289deaa)
This commit is contained in:
@@ -42,14 +42,14 @@ class SquadronDelegate(TwoColumnRowDelegate):
|
||||
|
||||
def text_for(self, index: QModelIndex, row: int, column: int) -> str:
|
||||
if (row, column) == (0, 0):
|
||||
return self.air_wing_model.data(index, Qt.DisplayRole)
|
||||
return self.squadron(index).name
|
||||
elif (row, column) == (0, 1):
|
||||
squadron = self.air_wing_model.data(index, AirWingModel.SquadronRole)
|
||||
return db.unit_get_expanded_info(
|
||||
squadron.country, squadron.aircraft, "name"
|
||||
)
|
||||
elif (row, column) == (1, 0):
|
||||
return self.squadron(index).nickname
|
||||
return self.squadron(index).nickname or ""
|
||||
elif (row, column) == (1, 1):
|
||||
squadron = self.squadron(index)
|
||||
alive = squadron.number_of_living_pilots
|
||||
|
||||
Reference in New Issue
Block a user