From 8f0ca08b891370acdbc21764236e402b06b9144b Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 12 Jun 2023 23:23:20 -0700 Subject: [PATCH] Move turn passing to post-debrief. If we're going to show a game over dialog, we need to do so before moving to the next turn, but we will still want to show the debriefing window. Move those steps to happen after the debrief window. https://github.com/dcs-liberation/dcs_liberation/issues/978 --- qt_ui/windows/QLiberationWindow.py | 4 +++- qt_ui/windows/QWaitingForMissionResultWindow.py | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qt_ui/windows/QLiberationWindow.py b/qt_ui/windows/QLiberationWindow.py index 6bdfd860..1c92a0d6 100644 --- a/qt_ui/windows/QLiberationWindow.py +++ b/qt_ui/windows/QLiberationWindow.py @@ -558,7 +558,9 @@ class QLiberationWindow(QMainWindow): def onDebriefing(self, debrief: Debriefing): logging.info("On Debriefing") self.debriefing = QDebriefingWindow(debrief) - self.debriefing.show() + self.debriefing.exec() + self.game.pass_turn() + GameUpdateSignal.get_instance().updateGame(self.game) def open_tgo_info_dialog(self, tgo: TheaterGroundObject) -> None: QGroundObjectMenu(self, tgo, tgo.control_point, self.game).show() diff --git a/qt_ui/windows/QWaitingForMissionResultWindow.py b/qt_ui/windows/QWaitingForMissionResultWindow.py index f26742b3..be7cdd2e 100644 --- a/qt_ui/windows/QWaitingForMissionResultWindow.py +++ b/qt_ui/windows/QWaitingForMissionResultWindow.py @@ -220,10 +220,7 @@ class QWaitingForMissionResultWindow(QDialog): def process_debriefing(self): with logged_duration("Turn processing"): self.sim_controller.process_results(self.debriefing) - self.game.pass_turn() - GameUpdateSignal.get_instance().sendDebriefing(self.debriefing) - GameUpdateSignal.get_instance().updateGame(self.game) self.accept() def closeEvent(self, evt):