From 6669f1ba1016019f6ecf982a10ae85c65ba72ffb Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 25 Jun 2018 11:56:27 +1000 Subject: [PATCH] fix card info dialog size not being remembered --- aqt/browser.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aqt/browser.py b/aqt/browser.py index d0b49764c..b2b3995c1 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -1095,7 +1095,11 @@ by clicking on one on the left.""")) return info, cs = self._cardInfoData() reps = self._revlogData(cs) - d = QDialog(self) + class CardInfoDialog(QDialog): + def reject(self): + saveGeom(self, "revlog") + return QDialog.reject(self) + d = CardInfoDialog(self) l = QVBoxLayout() l.setContentsMargins(0,0,0,0) w = AnkiWebView() @@ -1109,7 +1113,6 @@ by clicking on one on the left.""")) d.resize(500, 400) restoreGeom(d, "revlog") d.show() - saveGeom(d, "revlog") def _cardInfoData(self): from anki.stats import CardStats