mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
Factor out initializeNewFact
This commit is contained in:
parent
fe82902d5d
commit
f3b81d0024
1 changed files with 4 additions and 1 deletions
|
@ -149,9 +149,12 @@ question or answer on all cards."""), parent=self)
|
|||
self.reportAddedFact(fact)
|
||||
return fact
|
||||
|
||||
def clearOldFact(self, fact):
|
||||
def initializeNewFact(self, old_fact):
|
||||
f = self.parent.deck.newFact()
|
||||
f.tags = self.parent.deck.lastTags
|
||||
|
||||
def clearOldFact(self, old_fact):
|
||||
f = self.initializeNewFact(old_fact)
|
||||
self.editor.setFact(f, check=True, scroll=True)
|
||||
# let completer know our extra tags
|
||||
self.editor.tags.addTags(parseTags(self.parent.deck.lastTags))
|
||||
|
|
Loading…
Reference in a new issue