From 36c1d1cf8c49f14d67acea2e2a084b805b5fbeb4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 4 May 2020 15:46:10 +1000 Subject: [PATCH] reuse existing use count in note types screen --- qt/aqt/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt/aqt/models.py b/qt/aqt/models.py index f070ba1c5..fac30f48b 100644 --- a/qt/aqt/models.py +++ b/qt/aqt/models.py @@ -107,7 +107,8 @@ class Models(QDialog): if len(self.models) < 2: showInfo(_("Please add another note type first."), parent=self) return - if self.mm.useCount(self.model): + idx = self.form.modelsList.currentRow() + if self.models[idx].use_count: msg = _("Delete this note type and all its cards?") else: msg = _("Delete this unused note type?")