From b49d52393eecd50f7e84da7bd180e9f95e5da008 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 4 Sep 2013 03:20:20 +0900 Subject: [PATCH] add tags column in browser --- aqt/browser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aqt/browser.py b/aqt/browser.py index eff923472..e3f0b6215 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -234,6 +234,8 @@ class DataModel(QAbstractTableModel): return str(c.reps) elif type == "cardLapses": return str(c.lapses) + elif type == "noteTags": + return str(" ".join(c.note().tags)) elif type == "note": return c.model()['name'] elif type == "cardIvl": @@ -487,6 +489,7 @@ class Browser(QMainWindow): ('cardEase', _("Ease")), ('cardReps', _("Reviews")), ('cardLapses', _("Lapses")), + ('noteTags', _("Tags")), ('note', _("Note")), ] self.columns.sort(key=itemgetter(1)) @@ -631,7 +634,7 @@ class Browser(QMainWindow): def onSortChanged(self, idx, ord): type = self.model.activeCols[idx] - noSort = ("question", "answer", "template", "deck", "note") + noSort = ("question", "answer", "template", "deck", "note", "noteTags") if type in noSort: if type == "template": showInfo(_("""\