close other windows on reset()

This commit is contained in:
Damien Elmes 2008-11-22 16:17:13 +09:00
parent 8f983d5bcc
commit 6299e5f665

View file

@ -740,8 +740,6 @@ and due < :now""", now=time.time())
"Add a fact to the deck. Return list of new cards." "Add a fact to the deck. Return list of new cards."
if not fact.model: if not fact.model:
fact.model = self.currentModel fact.model = self.currentModel
# clear the session and refresh the model
fact.model = self.s.query(Model).get(fact.model.id)
# validate # validate
fact.assertValid() fact.assertValid()
fact.assertUnique(self.s) fact.assertUnique(self.s)
@ -752,7 +750,6 @@ and due < :now""", now=time.time())
# proceed # proceed
n = 0 n = 0
cards = [] cards = []
self.refresh()
self.s.save(fact) self.s.save(fact)
self.factCount += 1 self.factCount += 1
self.flushMod() self.flushMod()