mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
remove obsolote card backup, make sure to refresh session after edit
This commit is contained in:
parent
7b1fdb8833
commit
620fa5da55
1 changed files with 2 additions and 3 deletions
|
@ -7,7 +7,7 @@ from PyQt4.QtCore import *
|
|||
from PyQt4.QtWebKit import QWebPage
|
||||
|
||||
import os, sys, re, types, gettext, stat, traceback
|
||||
import copy, shutil, time, glob
|
||||
import shutil, time, glob
|
||||
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
|
@ -233,6 +233,7 @@ An error occurred. Please copy the following message into a bug report.\n\n""" +
|
|||
elif state == "saveEdit":
|
||||
self.editor.saveFieldsNow()
|
||||
self.deck.s.flush()
|
||||
self.deck.refresh()
|
||||
return self.moveToState("auto")
|
||||
self.updateViews(state)
|
||||
|
||||
|
@ -256,8 +257,6 @@ An error occurred. Please copy the following message into a bug report.\n\n""" +
|
|||
"Reschedule current card and move back to getQuestion state."
|
||||
if self.state != "showAnswer":
|
||||
return
|
||||
# copy card for undo
|
||||
self.lastCardBackup = copy.copy(self.currentCard)
|
||||
# remove card from session before updating it
|
||||
self.deck.s.expunge(self.currentCard)
|
||||
self.deck.answerCard(self.currentCard, quality)
|
||||
|
|
Loading…
Reference in a new issue