mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Shut down the sim update thread on quit.
Otherwise the update thread just sits there waiting forever...
This commit is contained in:
parent
03430a4df5
commit
de0b267568
@ -44,6 +44,9 @@ class SimController(QObject):
|
||||
self.recreate_game_loop(game)
|
||||
self.sim_speed_reset.emit(SimSpeedSetting.PAUSED)
|
||||
|
||||
def shut_down(self) -> None:
|
||||
self._sim_update_thread.stop()
|
||||
|
||||
def recreate_game_loop(self, game: Optional[Game]) -> None:
|
||||
if self.game_loop is not None:
|
||||
self._sim_update_thread.on_sim_pause()
|
||||
|
||||
@ -389,6 +389,7 @@ class QLiberationWindow(QMainWindow):
|
||||
QMessageBox.Yes | QMessageBox.No,
|
||||
)
|
||||
if result == QMessageBox.Yes:
|
||||
self.sim_controller.shut_down()
|
||||
super().closeEvent(event)
|
||||
self.dialog = None
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user