From 7ed1c458e8fc394b70847ded23977a4030d96f6a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 16 Mar 2009 06:33:17 +0900 Subject: [PATCH] ensure that anki restarted before check db run --- ankiqt/ui/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 691718dd1..8c2eaf063 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -74,6 +74,7 @@ class AnkiQt(QMainWindow): self.loadPlugins() self.setupAutoUpdate() self.rebuildPluginsMenu() + self.errorOccurred = False # run after-init hook try: runHook('init') @@ -159,6 +160,7 @@ Please do not file a bug report with Anki.

""") else: txt = stdText if self.pool: + self.parent.errorOccurred = True ui.utils.showText(txt + self.pool[0:10000].replace( "\n", "
")) self.pool = "" @@ -2136,6 +2138,10 @@ it to your friends. def onCheckDB(self): "True if no problems" + if self.errorOccurred: + ui.utils.showWarning(_( + "Please restart Anki before checking the DB.")) + return if not ui.utils.askUser(_("""\ This operation will find and fix some common problems.