mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
only update changed card ids after generating cards
This commit is contained in:
parent
5810af3199
commit
db4fb87d68
1 changed files with 3 additions and 2 deletions
|
@ -966,12 +966,13 @@ where id in %s""" % ids2str(sf))
|
|||
facts = self.deck.s.query(Fact).filter(
|
||||
text("id in %s" % ids2str(sf))).order_by(Fact.created).all()
|
||||
self.deck.updateProgress(_("Generating Cards..."))
|
||||
ids = []
|
||||
for c, fact in enumerate(facts):
|
||||
self.deck.addCards(fact, d.selectedCms)
|
||||
ids.extend(self.deck.addCards(fact, d.selectedCms))
|
||||
if c % 50 == 0:
|
||||
self.deck.updateProgress()
|
||||
self.deck.flushMod()
|
||||
self.deck.updateAllPriorities()
|
||||
self.deck.updatePriorities(ids)
|
||||
self.deck.finishProgress()
|
||||
self.parent.setProgressParent(None)
|
||||
self.deck.setUndoEnd(n)
|
||||
|
|
Loading…
Reference in a new issue