add note types back to browser, but without templates

This commit is contained in:
Damien Elmes 2012-01-30 08:02:06 +09:00
parent 43a8a0e4df
commit 2796b9eaf8
2 changed files with 14 additions and 0 deletions

View file

@ -611,6 +611,7 @@ class Browser(QMainWindow):
root = self.form.tree.invisibleRootItem()
self._systemTagTree(root)
self._decksTree(root)
self._modelTree(root)
self._userTagTree(root)
self.form.tree.expandToDepth(0)
self.form.tree.setIndentation(15)
@ -679,6 +680,19 @@ class Browser(QMainWindow):
fillGroups(item, g[4], newhead)
fillGroups(root, grps)
def _modelTree(self, root):
for m in sorted(self.col.models.all(), key=itemgetter("name")):
mitem = self.CallbackItem(
m['name'], lambda m=m: self.setFilter("model", m['name']))
mitem.setIcon(0, QIcon(":/icons/product_design.png"))
root.addChild(mitem)
# for t in m['tmpls']:
# titem = self.CallbackItem(
# t['name'], lambda m=m, t=t: self.setFilter(
# "model", m['name'], "card", t['name']))
# titem.setIcon(0, QIcon(":/icons/stock_new_template.png"))
# mitem.addChild(titem)
# Info
######################################################################

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB