From fce536f20541a4dc27e9aa322b6026b861d29c2b Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Sun, 10 Jan 2021 02:01:24 +0100 Subject: [PATCH] Close previewer if there is no card to render --- qt/aqt/browser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt/aqt/browser.py b/qt/aqt/browser.py index 8bb09f14f..1b4608f08 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -1575,7 +1575,10 @@ where id in %s""" def _renderPreview(self): if self._previewer: - self._previewer.render_card() + if self.singleCard: + self._previewer.render_card() + else: + self.onTogglePreview() def _cleanup_preview(self): if self._previewer: