mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 15:47:12 -05:00
fix changing model in editor not updating
This commit is contained in:
parent
a1d23c3e7b
commit
73bc481236
1 changed files with 3 additions and 2 deletions
|
|
@ -54,7 +54,8 @@ class AddCards(QDialog):
|
|||
def addChooser(self):
|
||||
self.modelChooser = ui.modelchooser.ModelChooser(self,
|
||||
self.parent,
|
||||
self.parent.deck)
|
||||
self.parent.deck,
|
||||
self.modelChanged)
|
||||
self.dialog.modelArea.setLayout(self.modelChooser)
|
||||
|
||||
def helpRequested(self):
|
||||
|
|
@ -98,7 +99,7 @@ class AddCards(QDialog):
|
|||
browser.updateSearch()
|
||||
browser.onFact()
|
||||
|
||||
def modelChanged(self):
|
||||
def modelChanged(self, model=None):
|
||||
oldFact = self.editor.fact
|
||||
# create a new fact
|
||||
fact = self.parent.deck.newFact()
|
||||
|
|
|
|||
Loading…
Reference in a new issue