From 1f318aff3c43c60eca2ad5f4747cda5c4f703b7e Mon Sep 17 00:00:00 2001 From: RndName Date: Wed, 23 Jun 2021 19:59:13 +0200 Subject: [PATCH] set window title empty on new game also fixed small exception when aborting the open file dialog which lead to " as filename fixes #1305 (cherry picked from commit 752c91a721dba72564b3f0b7e630014756d9db70) --- qt_ui/windows/QLiberationWindow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt_ui/windows/QLiberationWindow.py b/qt_ui/windows/QLiberationWindow.py index f8deb880..3466b53b 100644 --- a/qt_ui/windows/QLiberationWindow.py +++ b/qt_ui/windows/QLiberationWindow.py @@ -240,7 +240,7 @@ class QLiberationWindow(QMainWindow): dir=persistency._dcs_saved_game_folder, filter="*.liberation", ) - if file is not None: + if file is not None and file[0] != "": game = persistency.load_game(file[0]) GameUpdateSignal.get_instance().game_loaded.emit(game) @@ -282,6 +282,7 @@ class QLiberationWindow(QMainWindow): self.setWindowTitle(window_title) def onGameGenerated(self, game: Game): + self.updateWindowTitle() logging.info("On Game generated") self.game = game GameUpdateSignal.get_instance().game_loaded.emit(self.game)