mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 23:57:13 -05:00
allow 'change deck' from filtered
This commit is contained in:
parent
32f1d9c70b
commit
90145c4ee0
1 changed files with 8 additions and 2 deletions
|
|
@ -939,9 +939,15 @@ where id in %s""" % ids2str(sf))
|
|||
self.mw.checkpoint(_("Change Deck"))
|
||||
mod = intTime()
|
||||
usn = self.col.usn()
|
||||
# normal cards
|
||||
cids = self.selectedCards()
|
||||
scids = ids2str(cids)
|
||||
# remove any cards from filtered deck first
|
||||
self.col.sched.remFromDyn(cids)
|
||||
# then move into new deck
|
||||
self.col.db.execute("""
|
||||
update cards set usn=?, mod=?, did=? where odid=0 and id in """ + ids2str(
|
||||
self.selectedCards()), usn, mod, did)
|
||||
update cards set usn=?, mod=?, did=? where id in """ + scids,
|
||||
usn, mod, did)
|
||||
self.onSearch(reset=False)
|
||||
self.mw.requireReset()
|
||||
self.model.endReset()
|
||||
|
|
|
|||
Loading…
Reference in a new issue