Fix exception after new payload file was saved

When a new payload file would be saved, the subsequent flight would always throw an exception (until Retribution would be restarted) because the payload_cache wasn't updated until now.
This commit is contained in:
Raffson
2023-09-09 12:03:47 +02:00
parent 09749bc088
commit 0cb3702eb9
2 changed files with 2 additions and 1 deletions

View File

@@ -123,6 +123,7 @@ class QLoadoutEditor(QGroupBox):
f.write("local unitPayloads = ")
f.write(lua.dumps(payloads, indent=1))
f.write("\nreturn unitPayloads")
self.flight.unit_type.dcs_unit_type.add_to_payload_cache(payload_file)
self.saved.emit(payload_name)
QMessageBox.information(
QWidget(),