From f7bf90100dc1f7b62a2560cf2f21f4d603cad513 Mon Sep 17 00:00:00 2001 From: RumovZ Date: Wed, 14 Apr 2021 23:01:40 +0200 Subject: [PATCH] Fix ChangeModel combos being cleared after setup() --- qt/aqt/browser/dialogs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt/aqt/browser/dialogs.py b/qt/aqt/browser/dialogs.py index 9f3671d1b..900f8f6be 100644 --- a/qt/aqt/browser/dialogs.py +++ b/qt/aqt/browser/dialogs.py @@ -48,13 +48,13 @@ class ChangeModel(QDialog): self.form.setupUi(self) disable_help_button(self) self.setWindowModality(Qt.WindowModal) + # ugh - these are set dynamically by rebuildTemplateMap() + self.tcombos: List[QComboBox] = [] + self.fcombos: List[QComboBox] = [] self.setup() restoreGeom(self, "changeModel") gui_hooks.state_did_reset.append(self.onReset) 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_() def on_note_type_change(self, notetype: NotetypeDict) -> None: