From c5d104807e6b51820aa03ae36987bd1e63f82ac2 Mon Sep 17 00:00:00 2001 From: Benjamin Auquite Date: Thu, 14 Mar 2024 09:00:40 -0500 Subject: [PATCH] Update main.py --- Tools/HolocronToolset/src/toolset/gui/windows/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tools/HolocronToolset/src/toolset/gui/windows/main.py b/Tools/HolocronToolset/src/toolset/gui/windows/main.py index 13538c167..68504cf2e 100644 --- a/Tools/HolocronToolset/src/toolset/gui/windows/main.py +++ b/Tools/HolocronToolset/src/toolset/gui/windows/main.py @@ -918,10 +918,13 @@ def changeActiveInstallation(self, index: int): return def load_task(active: HTInstallation | None = None) -> HTInstallation: - return active or HTInstallation(path, name, tsl, self) + new_active = active or HTInstallation(path, name, tsl, self) + if active is None: + new_active.reload_all() + return new_active active = self.installations.get(name) - loader = AsyncLoader(self, "Loading Installation" if not active else "Refreshing installation", lambda: load_task(active), "Failed to load installation") + loader = AsyncLoader(self, "Loading Installation" if active is None else "Refreshing installation", lambda: load_task(active), "Failed to load installation") if not loader.exec_(): self.active = None self.ui.gameCombo.setCurrentIndex(0)