don't allow final template to be deleted in empty note type

This commit is contained in:
Damien Elmes 2012-04-20 22:37:20 +09:00
parent 9fc21a61dc
commit 21d60086a8
2 changed files with 3 additions and 1 deletions

View file

@ -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()):

View file

@ -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>