mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
don't let user remove facts by disabling all card models
This commit is contained in:
parent
edcad222d0
commit
cf1b0e45f0
1 changed files with 3 additions and 0 deletions
|
@ -1274,6 +1274,9 @@ class ChangeModelDialog(QDialog):
|
|||
not fmap):
|
||||
return ui.utils.showInfo(
|
||||
_("Targets must be unique."), parent=self)
|
||||
if not any(cmap.values()):
|
||||
return ui.utils.showInfo(
|
||||
_("Must map at least one template."), parent=self)
|
||||
if self.targetModel == self.oldModel:
|
||||
self.ret = (self.targetModel, None, cmap)
|
||||
return QDialog.accept(self)
|
||||
|
|
Loading…
Reference in a new issue