Send events when closing AWCD mid-campaign

Should fix the issue where the map isn't properly updating after making changes to the AWCD
This commit is contained in:
Raffson 2024-02-16 21:12:12 +01:00
parent 08c007b7bf
commit ca0a100d9a
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -19,6 +19,8 @@ from PySide6.QtWidgets import (
)
from game.ato.flight import Flight
from game.server import EventStream
from game.sim import GameUpdateEvents
from game.squadrons import Squadron
from game.theater import ConflictTheater
from qt_ui.delegates import TwoColumnRowDelegate
@ -258,6 +260,9 @@ class AirWingTabs(QTabWidget):
def open_awcd(self, gm: GameModel):
AirWingConfigurationDialog(gm.game, True, self).exec_()
events = GameUpdateEvents().begin_new_turn()
EventStream.put_nowait(events)
gm.ato_model.on_sim_update(events)
class AirWingDialog(QDialog):