From 055533f4ed7792d8e14e0cfbe7452744c32eedb9 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sat, 17 Oct 2020 01:10:55 +0200 Subject: Sort moodle courses in GUI --- gui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui.py b/gui.py index ffa8116..f9ce8aa 100644 --- a/gui.py +++ b/gui.py @@ -166,6 +166,9 @@ class MoodleTreeView(QTreeWidget): for leaf in self.worker.moodleItems.leaves: self.addTopLevelItem(leaf.qt) + # sort only after the worker is done for efficiency + self.setSortingEnabled(True) + class QPlainTextEditLogger(logging.Handler): def __init__(self, parent): super().__init__() -- cgit v1.2.1