From 6e5a8269931cc8e8d59070629e59eaf5f201b5f4 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Mon, 14 Sep 2020 13:06:20 +0200 Subject: [PATCH] Put sync_did_finish hook before after_sync because it might unload collection --- qt/aqt/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt/aqt/main.py b/qt/aqt/main.py index 31f42d1e9..912bdc4c7 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -909,9 +909,10 @@ title="%s" %s>%s""" % ( self.col.clearUndo() self.col.models._clear_cache() self.reset() - after_sync() gui_hooks.sync_did_finish() + after_sync() + gui_hooks.sync_will_start() sync_collection(self, on_done=on_collection_sync_finished)