mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add predefined squadron support.
https://github.com/dcs-liberation/dcs_liberation/issues/276
This commit is contained in:
@@ -397,7 +397,7 @@ class AirWingModel(QAbstractListModel):
|
||||
@staticmethod
|
||||
def text_for_squadron(squadron: Squadron) -> str:
|
||||
"""Returns the text that should be displayed for the squadron."""
|
||||
return squadron.name
|
||||
return str(squadron)
|
||||
|
||||
@staticmethod
|
||||
def icon_for_squadron(squadron: Squadron) -> Optional[QIcon]:
|
||||
|
||||
@@ -68,7 +68,7 @@ class SquadronDialog(QDialog):
|
||||
self.squadron_model = squadron_model
|
||||
|
||||
self.setMinimumSize(1000, 440)
|
||||
self.setWindowTitle(squadron_model.squadron.name)
|
||||
self.setWindowTitle(str(squadron_model.squadron))
|
||||
# TODO: self.setWindowIcon()
|
||||
|
||||
layout = QVBoxLayout()
|
||||
|
||||
@@ -102,7 +102,7 @@ class QFlightSlotEditor(QGroupBox):
|
||||
layout.addWidget(self.aircraft_count_spinner, 0, 1)
|
||||
|
||||
layout.addWidget(QLabel("Squadron:"), 1, 0)
|
||||
layout.addWidget(QLabel(self.flight.squadron.name), 1, 1)
|
||||
layout.addWidget(QLabel(str(self.flight.squadron)), 1, 1)
|
||||
|
||||
layout.addWidget(QLabel("Assigned pilots:"), 2, 0)
|
||||
self.pilot_selectors = []
|
||||
|
||||
Reference in New Issue
Block a user