mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
don't allow final template to be deleted in empty note type
This commit is contained in:
parent
9fc21a61dc
commit
21d60086a8
2 changed files with 3 additions and 1 deletions
|
@ -106,6 +106,8 @@ class CardLayout(QDialog):
|
|||
self.tabs.addTab(w, t['name'])
|
||||
|
||||
def onRemoveTab(self, idx):
|
||||
if len(self.model['tmpls']) < 2:
|
||||
return showInfo(_("At least one template is required."))
|
||||
if not askUser(_("Remove all cards of this type?")):
|
||||
return
|
||||
if not self.mm.remTemplate(self.model, self.cards[idx].template()):
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<item>
|
||||
<widget class="QPlainTextEdit" name="log">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
|
|
Loading…
Reference in a new issue