mirror of
https://github.com/ankitects/anki.git
synced 2025-11-13 08:07:11 -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):
|
def addChooser(self):
|
||||||
self.modelChooser = ui.modelchooser.ModelChooser(self,
|
self.modelChooser = ui.modelchooser.ModelChooser(self,
|
||||||
self.parent,
|
self.parent,
|
||||||
self.parent.deck)
|
self.parent.deck,
|
||||||
|
self.modelChanged)
|
||||||
self.dialog.modelArea.setLayout(self.modelChooser)
|
self.dialog.modelArea.setLayout(self.modelChooser)
|
||||||
|
|
||||||
def helpRequested(self):
|
def helpRequested(self):
|
||||||
|
|
@ -98,7 +99,7 @@ class AddCards(QDialog):
|
||||||
browser.updateSearch()
|
browser.updateSearch()
|
||||||
browser.onFact()
|
browser.onFact()
|
||||||
|
|
||||||
def modelChanged(self):
|
def modelChanged(self, model=None):
|
||||||
oldFact = self.editor.fact
|
oldFact = self.editor.fact
|
||||||
# create a new fact
|
# create a new fact
|
||||||
fact = self.parent.deck.newFact()
|
fact = self.parent.deck.newFact()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue