aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2020-06-07 12:39:47 +0200
committerJoris2020-06-07 12:39:51 +0200
commitfe3f1c155c34f2fcdce3646a7a0d64edd485417a (patch)
tree4653308b3087f4b416764479b23489938cd4f67a
parent1595e0de940a86a7810df0e02e43838d97c0d846 (diff)
Sorter tags alphabetically in dialog form
-rw-r--r--todo/gui/tags/list.py2
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)