mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
confirmation on template delete
This commit is contained in:
parent
2caf92e58d
commit
1f0f31a337
1 changed files with 2 additions and 0 deletions
|
@ -98,6 +98,8 @@ class CardLayout(QDialog):
|
||||||
self.tabs.addTab(w, t['name'])
|
self.tabs.addTab(w, t['name'])
|
||||||
|
|
||||||
def onRemoveTab(self, idx):
|
def onRemoveTab(self, idx):
|
||||||
|
if not askUser(_("Remove template and all its cards?")):
|
||||||
|
return
|
||||||
if not self.mm.remTemplate(self.model, self.cards[idx].template()):
|
if not self.mm.remTemplate(self.model, self.cards[idx].template()):
|
||||||
return showWarning(_("""\
|
return showWarning(_("""\
|
||||||
Removing this card would cause one or more notes to be deleted. \
|
Removing this card would cause one or more notes to be deleted. \
|
||||||
|
|
Loading…
Reference in a new issue