From c964be396149c7cad5f7b5ccfd756e377870f49d Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 10 Apr 2020 18:42:28 +1000 Subject: [PATCH] make sure preview window is closed when browser closed --- qt/aqt/browser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qt/aqt/browser.py b/qt/aqt/browser.py index 4af8e9d8d..b69ef465b 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -693,7 +693,7 @@ class Browser(QMainWindow): evt.ignore() def _closeWindow(self): - self._cancelPreviewTimer() + self._cleanup_preview() self.editor.cleanup() saveSplitter(self.form.splitter, "editor3") saveGeom(self, "editor") @@ -1576,9 +1576,10 @@ where id in %s""" if self._previewer: self._previewer.render_card(cardChanged) - def _cancelPreviewTimer(self): + def _cleanup_preview(self): if self._previewer: self._previewer.cancel_timer() + self._previewer.close() def _on_preview_closed(self): self._previewer = None