fix: correct review patch GUI indentation

This commit is contained in:
Aaron Liang
2026-07-14 22:51:19 +08:00
parent 9541b41742
commit ce016d5b08
+7 -7
View File
@@ -19,13 +19,13 @@ if end < 0:
raise RuntimeError("GUI UI replacement block end not found") raise RuntimeError("GUI UI replacement block end not found")
replacement = r'''app = between(app, " def log(self, message):\n", " def should_stop(self):\n", ''' + "'''" + r''' def _call_ui(self, func, *args): replacement = r'''app = between(app, " def log(self, message):\n", " def should_stop(self):\n", ''' + "'''" + r''' def _call_ui(self, func, *args):
if threading.get_ident() == self._ui_thread_id: if threading.get_ident() == self._ui_thread_id:
func(*args) func(*args)
return return
try: try:
self.root.after(0, lambda: func(*args)) self.root.after(0, lambda: func(*args))
except Exception: except Exception:
pass pass
def _append_log_line(self, line): def _append_log_line(self, line):
self.log_text.insert(tk.END, f"{line}\n") self.log_text.insert(tk.END, f"{line}\n")