mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Merge pull request #1129 from RumovZ/cloze-bug
Fix index out of range error when changing cloze model
This commit is contained in:
commit
223aa64626
1 changed files with 3 additions and 3 deletions
|
@ -48,13 +48,13 @@ class ChangeModel(QDialog):
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
disable_help_button(self)
|
disable_help_button(self)
|
||||||
self.setWindowModality(Qt.WindowModal)
|
self.setWindowModality(Qt.WindowModal)
|
||||||
|
# ugh - these are set dynamically by rebuildTemplateMap()
|
||||||
|
self.tcombos: List[QComboBox] = []
|
||||||
|
self.fcombos: List[QComboBox] = []
|
||||||
self.setup()
|
self.setup()
|
||||||
restoreGeom(self, "changeModel")
|
restoreGeom(self, "changeModel")
|
||||||
gui_hooks.state_did_reset.append(self.onReset)
|
gui_hooks.state_did_reset.append(self.onReset)
|
||||||
gui_hooks.current_note_type_did_change.append(self.on_note_type_change)
|
gui_hooks.current_note_type_did_change.append(self.on_note_type_change)
|
||||||
# ugh - these are set dynamically by rebuildTemplateMap()
|
|
||||||
self.tcombos: List[QComboBox] = []
|
|
||||||
self.fcombos: List[QComboBox] = []
|
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
||||||
def on_note_type_change(self, notetype: NotetypeDict) -> None:
|
def on_note_type_change(self, notetype: NotetypeDict) -> None:
|
||||||
|
|
Loading…
Reference in a new issue