mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't hard code models
This commit is contained in:
parent
0081ff32d0
commit
9fd4000c0b
1 changed files with 3 additions and 8 deletions
|
@ -176,14 +176,9 @@ class AddModel(QDialog):
|
||||||
self.dialog = ankiqt.forms.addmodel.Ui_AddModel()
|
self.dialog = ankiqt.forms.addmodel.Ui_AddModel()
|
||||||
self.dialog.setupUi(self)
|
self.dialog.setupUi(self)
|
||||||
self.models = {}
|
self.models = {}
|
||||||
for name in (
|
names = stdmodels.models.keys()
|
||||||
"Basic",
|
names.sort()
|
||||||
"Japanese",
|
for name in names:
|
||||||
"English",
|
|
||||||
"Cantonese",
|
|
||||||
"Mandarin",
|
|
||||||
"Heisig"):
|
|
||||||
# hard code the order so that most common come first
|
|
||||||
m = stdmodels.byName(name)
|
m = stdmodels.byName(name)
|
||||||
item = QListWidgetItem(m.name)
|
item = QListWidgetItem(m.name)
|
||||||
self.dialog.models.addItem(item)
|
self.dialog.models.addItem(item)
|
||||||
|
|
Loading…
Reference in a new issue