mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't prompt when no cards to remove; don't autodel on indiv. note edits
This commit is contained in:
parent
0b96e8a1a9
commit
428b6a0520
2 changed files with 7 additions and 2 deletions
|
@ -392,6 +392,8 @@ select id from notes where id in %s and id not in (select nid from cards)""" %
|
|||
self._remNotes(nids)
|
||||
|
||||
def remEmptyCards(self, ids):
|
||||
if not ids:
|
||||
return
|
||||
if runFilter("remEmptyCards", len(ids), True):
|
||||
self.remCards(ids)
|
||||
|
||||
|
|
|
@ -157,5 +157,8 @@ insert or replace into notes values (?,?,?,?,?,?,?,?,?,?,?,?)""",
|
|||
def _postFlush(self):
|
||||
# generate missing cards
|
||||
if not self.newlyAdded:
|
||||
ids = self.col.genCards([self.id])
|
||||
self.col.remEmptyCards(ids)
|
||||
rem = self.col.genCards([self.id])
|
||||
# popping up a dialog while editing is confusing; instead we can
|
||||
# document that the user should open the templates window to
|
||||
# garbage collect empty cards
|
||||
#self.col.remEmptyCards(ids)
|
||||
|
|
Loading…
Reference in a new issue