mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Don't ask when no cards would be generated
https://forums.ankiweb.net/t/when-adding-cards-to-a-note-type-dont-show-this-will-create-0-cards/34237
This commit is contained in:
parent
87dc9aac4b
commit
81a4d531e3
1 changed files with 1 additions and 1 deletions
|
@ -688,7 +688,7 @@ class CardLayout(QDialog):
|
|||
def onAddCard(self) -> None:
|
||||
cnt = self.mw.col.models.use_count(self.model)
|
||||
txt = tr.card_templates_this_will_create_card_proceed(count=cnt)
|
||||
if not askUser(txt):
|
||||
if cnt and not askUser(txt):
|
||||
return
|
||||
if not self.change_tracker.mark_schema():
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue