mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Fix UI quirks when reopening custom loadout.
* Disable the selector. * Select the default loadout rather than the first one so unchecking the custom box goes back to the default loadout. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1152
This commit is contained in:
parent
6094179a40
commit
34f3a50234
@ -13,7 +13,11 @@ class DcsLoadoutSelector(QComboBox):
|
||||
for loadout in Loadout.iter_for(flight):
|
||||
self.addItem(loadout.name, loadout)
|
||||
self.model().sort(0)
|
||||
self.setCurrentText(flight.loadout.name)
|
||||
self.setDisabled(flight.loadout.is_custom)
|
||||
if flight.loadout.is_custom:
|
||||
self.setCurrentText(Loadout.default_for(flight).name)
|
||||
else:
|
||||
self.setCurrentText(flight.loadout.name)
|
||||
|
||||
|
||||
class QFlightPayloadTab(QFrame):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user