diff options
author | Joris | 2020-06-07 12:39:47 +0200 |
---|---|---|
committer | Joris | 2020-06-07 12:39:51 +0200 |
commit | fe3f1c155c34f2fcdce3646a7a0d64edd485417a (patch) | |
tree | 4653308b3087f4b416764479b23489938cd4f67a | |
parent | 1595e0de940a86a7810df0e02e43838d97c0d846 (diff) |
Sorter tags alphabetically in dialog form
-rw-r--r-- | todo/gui/tags/list.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/todo/gui/tags/list.py b/todo/gui/tags/list.py index d0374ed..857b6ff 100644 --- a/todo/gui/tags/list.py +++ b/todo/gui/tags/list.py @@ -30,7 +30,7 @@ def widget(parent, init_tags: List[int]) -> Tuple[QtWidgets.QWidget, SelectionSi list_widget.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection) layout.addWidget(list_widget) - tags = todo.db.tags.get(todo.database.cursor()) + tags = sorted(todo.db.tags.get(todo.database.cursor()), key=lambda t: t.name) for tag in tags: item = QtWidgets.QListWidgetItem(tag.name) |