From 42eb625ef6a82ed8caf8f46ec2f6c42f136eee80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20R=C3=A9aux?= Date: Fri, 13 Feb 2026 08:01:26 +0100 Subject: [PATCH] fix select round after closing --- src/warchron/controller/round_controller.py | 4 +++- src/warchron/view/view.py | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/warchron/controller/round_controller.py b/src/warchron/controller/round_controller.py index fcca17e..d5a09e3 100644 --- a/src/warchron/controller/round_controller.py +++ b/src/warchron/controller/round_controller.py @@ -141,7 +141,9 @@ class RoundController: return self.app.is_dirty = True self.app.navigation.refresh(RefreshScope.CURRENT_SELECTION_DETAILS) - self.app.navigation.refresh(RefreshScope.WARS_TREE) + self.app.navigation.refresh_and_select( + RefreshScope.WARS_TREE, item_type=ItemType.ROUND, item_id=round_id + ) # Choice methods diff --git a/src/warchron/view/view.py b/src/warchron/view/view.py index caf73ae..d4aed89 100644 --- a/src/warchron/view/view.py +++ b/src/warchron/view/view.py @@ -238,6 +238,10 @@ class View(QtWidgets.QMainWindow, Ui_MainWindow): def display_wars_tree(self, wars: List[WarDTO]) -> None: tree = self.warsTree + try: + tree.currentItemChanged.disconnect() + except TypeError: + pass tree.clear() tree.setColumnCount(1) tree.setHeaderLabels(["Wars"])