fix: refresh model list when legacy addon adds notetype (#2825)

* refresh model list when legacy addon adds notetype

When legacy addons add note types, they automatically add the note type to the collection models. When this was detected, the dialog box presenting the list of models was not being updated due to an early return in the code. This commit adds a list refresh along this path of execution to ensure the gui is updated with the newly added model.

* add trailing space to name in CONTRIBUTORS
This commit is contained in:
Kieran Black 2023-11-12 19:36:21 -05:00 committed by GitHub
parent 6cb4155e8e
commit 46890fbbaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -147,6 +147,7 @@ class Models(QDialog):
def on_success(notetype: NotetypeDict) -> None:
# if legacy add-ons already added the notetype, skip adding
if notetype["id"]:
self.refresh_list()
return
# prompt for name