mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Stop loadout resetting each time the editor opens.
This commit is contained in:
parent
558dc591a3
commit
64b2eeface
@ -37,9 +37,12 @@ class QLoadoutEditor(QGroupBox):
|
||||
hboxLayout.addStretch()
|
||||
self.setLayout(hboxLayout)
|
||||
|
||||
if not self.isChecked():
|
||||
for i in self.findChildren(QPylonEditor):
|
||||
i.default_loadout(i.pylon.number)
|
||||
|
||||
def on_toggle(self):
|
||||
self.flight.use_custom_loadout = self.isChecked()
|
||||
# When the toggle button is hit, reset the loadout to default.
|
||||
# We need to do this regardless of whether we're toggling on or off.
|
||||
for i in self.findChildren(QPylonEditor):
|
||||
i.default_loadout(i.pylon.number)
|
||||
if not self.isChecked():
|
||||
for i in self.findChildren(QPylonEditor):
|
||||
i.default_loadout(i.pylon.number)
|
||||
|
||||
@ -29,8 +29,7 @@ class QPylonEditor(QComboBox):
|
||||
self.addItem(weapon.name, weapon)
|
||||
if current == weapon:
|
||||
self.setCurrentIndex(i + 1)
|
||||
|
||||
self.default_loadout(self.pylon)
|
||||
|
||||
self.currentIndexChanged.connect(self.on_pylon_change)
|
||||
|
||||
def on_pylon_change(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user