mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Make new flight comboboxes auto-adjust their size.
Content was previously being cut off when the first airport selected had a shorter name than the one the player wanted.
This commit is contained in:
parent
64b2eeface
commit
7ae934e940
@ -15,3 +15,4 @@ class QAircraftTypeSelector(QComboBox):
|
||||
for aircraft in aircraft_types:
|
||||
self.addItem(f"{db.unit_pretty_name(country, aircraft)}", userData=aircraft)
|
||||
self.model().sort(0)
|
||||
self.setSizeAdjustPolicy(self.AdjustToContents)
|
||||
|
||||
@ -27,6 +27,7 @@ class QOriginAirfieldSelector(QComboBox):
|
||||
self.aircraft = aircraft
|
||||
self.rebuild_selector()
|
||||
self.currentIndexChanged.connect(self.index_changed)
|
||||
self.setSizeAdjustPolicy(self.AdjustToContents)
|
||||
|
||||
def change_aircraft(self, aircraft: FlyingType) -> None:
|
||||
if self.aircraft == aircraft:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user