mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
Merge pull request #271 from Arthur-Milchior/quickerMoveTemplate
moveTemplate slightly quicker
This commit is contained in:
commit
fcfb45ccdf
1 changed files with 4 additions and 1 deletions
|
@ -397,7 +397,10 @@ update cards set ord = ord - 1, usn = ?, mod = ?
|
|||
# generate change map
|
||||
map = []
|
||||
for t in m['tmpls']:
|
||||
map.append("when ord = %d then %d" % (oldidxs[id(t)], t['ord']))
|
||||
oldidx = oldidxs[id(t)]
|
||||
newidx = t['ord']
|
||||
if oldidx != newidx:
|
||||
map.append("when ord = %d then %d" % (oldidx, newidx))
|
||||
# apply
|
||||
self.save(m)
|
||||
self.col.db.execute("""
|
||||
|
|
Loading…
Reference in a new issue