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
This commit is contained in:
Dan Albert 2023-06-12 23:23:20 -07:00
parent 0534f66b30
commit 8f0ca08b89
2 changed files with 3 additions and 4 deletions

View File

@ -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()

View File

@ -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):