Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
th3w1zard1 committed Mar 14, 2024
1 parent 1accc3b commit c5d1048
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tools/HolocronToolset/src/toolset/gui/windows/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c5d1048

Please sign in to comment.