mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Update the map from the main window.
This guarantees that we update the map *after* updating the model that the map uses to draw flight plans. Without this, after creating a new game we'd redraw the previous game's flight plans because the model hadn't been updated by the time the map was. Fixes https://github.com/Khopa/dcs_liberation/issues/212
This commit is contained in:
@@ -43,6 +43,7 @@ class QLiberationWindow(QMainWindow):
|
||||
Dialog.set_game(self.game_model)
|
||||
self.ato_panel = None
|
||||
self.info_panel = None
|
||||
self.liberation_map = None
|
||||
self.setGame(persistency.restore_game())
|
||||
|
||||
self.setGeometry(300, 100, 270, 100)
|
||||
@@ -224,9 +225,11 @@ class QLiberationWindow(QMainWindow):
|
||||
if game is not None:
|
||||
game.on_load()
|
||||
self.game = game
|
||||
if self.info_panel:
|
||||
if self.info_panel is not None:
|
||||
self.info_panel.setGame(game)
|
||||
self.game_model.set(self.game)
|
||||
if self.liberation_map is not None:
|
||||
self.liberation_map.setGame(game)
|
||||
|
||||
def showAboutDialog(self):
|
||||
text = "<h3>DCS Liberation " + CONST.VERSION_STRING + "</h3>" + \
|
||||
|
||||
Reference in New Issue
Block a user