mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
no 'all its cards' if empty
This commit is contained in:
parent
c964322915
commit
fc271e0f55
1 changed files with 5 additions and 3 deletions
|
@ -87,9 +87,11 @@ class Models(QDialog):
|
||||||
showInfo(_("Please add another note type first."),
|
showInfo(_("Please add another note type first."),
|
||||||
parent=self)
|
parent=self)
|
||||||
return
|
return
|
||||||
if not askUser(
|
if self.mm.useCount(self.model):
|
||||||
_("Delete this note type and all its cards?"),
|
msg = _("Delete this note type and all its cards?")
|
||||||
parent=self):
|
else:
|
||||||
|
msg = _("Delete this unused note type?")
|
||||||
|
if not askUser(msg, parent=self):
|
||||||
return
|
return
|
||||||
self.mm.rem(self.model)
|
self.mm.rem(self.model)
|
||||||
self.model = None
|
self.model = None
|
||||||
|
|
Loading…
Reference in a new issue