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 48d38bb9af
commit b363445135
2 changed files with 2 additions and 1 deletions

View file

@ -118,7 +118,7 @@ yellowjello <github.com/yellowjello>
Ingemar Berg <github.com/ingemarberg>
Ben Kerman <ben@kermanic.org>
Euan Kemp <euank@euank.com>
Kieran Black <kieranlblack@gmail.com>
Kieran Black <kieranlblack@gmail.com>
XeR <github.com/XeR>
mgrottenthaler <github.com/mgrottenthaler>
Austin Siew <github.com/Aquafina-water-bottle>

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