From acd9811e3f1a4a1663ece1fd0c7f1c71b56ba0da Mon Sep 17 00:00:00 2001 From: phanes Date: Sat, 29 Apr 2023 20:39:19 -0400 Subject: [PATCH] children are now sorted by title for navbar --- src/Hier.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Hier.py b/src/Hier.py index dc1ae1a..6348aef 100644 --- a/src/Hier.py +++ b/src/Hier.py @@ -37,7 +37,8 @@ class Hier: for unique_name, children in tree.items(): item_instance = self._bottom_up.get_item_by_uname(unique_name) - item_instance.children = self.build_instance_tree( children ) + sorted_children = self.build_instance_tree(children) + item_instance.children = sorted(sorted_children, key=lambda child: child.title) instance_list.append(item_instance) return instance_list