From f638f8c5b7f59043ebf64ab88dde7c80428d1728 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 3 Apr 2024 14:10:06 +0700 Subject: [PATCH] Possible fix for crash on first sync https://forums.ankiweb.net/t/desktop-app-closes-itself-after-i-try-to-log-in/43132 (cherry picked from commit a5154635dcaf97058eb4854c1fe6aa8301b1e469) --- qt/aqt/sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/aqt/sync.py b/qt/aqt/sync.py index 861c632f5..cd0a976c2 100644 --- a/qt/aqt/sync.py +++ b/qt/aqt/sync.py @@ -170,7 +170,7 @@ def confirm_full_download( ) -> None: # confirmation step required, as some users customize their notetypes # in an empty collection, then want to upload them - if not askUser(tr.sync_confirm_empty_download()): + if not askUser(tr.sync_confirm_empty_download(), parent=mw): return on_done() else: mw.closeAllWindows(lambda: full_download(mw, server_usn, on_done)) @@ -182,7 +182,7 @@ def confirm_full_upload( # confirmation step required, as some users have reported an upload # happening despite having their AnkiWeb collection not being empty # (not reproducible - maybe a compiler bug?) - if not askUser(tr.sync_confirm_empty_upload()): + if not askUser(tr.sync_confirm_empty_upload(), parent=mw): return on_done() else: mw.closeAllWindows(lambda: full_upload(mw, server_usn, on_done))