mirror of
https://github.com/ankitects/anki.git
synced 2025-11-13 08:07:11 -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"))
|
self.mw.checkpoint(_("Change Deck"))
|
||||||
mod = intTime()
|
mod = intTime()
|
||||||
usn = self.col.usn()
|
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("""
|
self.col.db.execute("""
|
||||||
update cards set usn=?, mod=?, did=? where odid=0 and id in """ + ids2str(
|
update cards set usn=?, mod=?, did=? where id in """ + scids,
|
||||||
self.selectedCards()), usn, mod, did)
|
usn, mod, did)
|
||||||
self.onSearch(reset=False)
|
self.onSearch(reset=False)
|
||||||
self.mw.requireReset()
|
self.mw.requireReset()
|
||||||
self.model.endReset()
|
self.model.endReset()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue