From 8b5e0710f80e356a797d2228aa72fed5f2ddefb0 Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Thu, 27 Aug 2026 15:41:33 +0200 Subject: [PATCH] safety: keep install UI state stable during downloads --- setup_tool_dynamic.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup_tool_dynamic.py b/setup_tool_dynamic.py index 9d94f2e..5d55e37 100644 --- a/setup_tool_dynamic.py +++ b/setup_tool_dynamic.py @@ -89,6 +89,12 @@ class ModernWowSetupTool(WowSetupTool): y = self.root.winfo_rooty() + max((self.root.winfo_height() - height) // 2, 0) win.geometry(f"{width}x{height}+{x}+{y}") win.lift() + try: + # Keep checkboxes and folder selection from changing underneath a + # synchronous installation while progress callbacks pump Tk events. + win.grab_set() + except tk.TclError: + pass # update(), not only update_idletasks(), is intentional here: downloads # run synchronously on the main thread, so Windows otherwise paints an @@ -145,6 +151,10 @@ class ModernWowSetupTool(WowSetupTool): if self._download_window is not None: try: if self._download_window.winfo_exists(): + try: + self._download_window.grab_release() + except tk.TclError: + pass self._download_window.destroy() except tk.TclError: pass