diff --git a/src/calibre/gui2/tweak_book/boss.py b/src/calibre/gui2/tweak_book/boss.py index 09601657c6..1ab19cf9d0 100644 --- a/src/calibre/gui2/tweak_book/boss.py +++ b/src/calibre/gui2/tweak_book/boss.py @@ -285,6 +285,7 @@ class Boss(QObject): det_msg=job.traceback, show=True) if cn: self.save_manager.clear_notify_data() + self.gui.check_book.clear() dictionaries.clear_ignored(), dictionaries.clear_caches() parse_worker.clear() container = job.result diff --git a/src/calibre/gui2/tweak_book/check.py b/src/calibre/gui2/tweak_book/check.py index 22a8afaeaa..a96f86ad8f 100644 --- a/src/calibre/gui2/tweak_book/check.py +++ b/src/calibre/gui2/tweak_book/check.py @@ -100,7 +100,9 @@ class Check(QSplitter): def save_state(self): tprefs.set('check-book-splitter-state', bytearray(self.saveState())) - def clear_help(self, msg): + def clear_help(self, msg=None): + if msg is None: + msg = _('No problems found') self.help.setText('

%s

%s

' % ( msg, _('Click to run a check on the book'), _('Run check'))) @@ -207,7 +209,7 @@ class Check(QSplitter): self.current_item_changed() self.items.setFocus(Qt.OtherFocusReason) else: - self.clear_help(_('No problems found')) + self.clear_help() def fix_errors(self, container, errors): with BusyCursor(): @@ -230,6 +232,10 @@ class Check(QSplitter): self.current_item_activated() return super(Check, self).keyPressEvent(ev) + def clear(self): + self.items.clear() + self.clear_help() + def main(): from calibre.gui2 import Application from calibre.gui2.tweak_book.boss import get_container