From abd41b9feab16c5b29c3be13a0c80c6259cd6d3b Mon Sep 17 00:00:00 2001 From: samuel-w Date: Tue, 15 Dec 2020 21:23:30 -0600 Subject: [PATCH] Sort files in Extract dialog alphabetically. By @samuel-w (#741) --- src/vorta/views/partials/tree_view.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vorta/views/partials/tree_view.py b/src/vorta/views/partials/tree_view.py index 01cd05e2..56b9e631 100644 --- a/src/vorta/views/partials/tree_view.py +++ b/src/vorta/views/partials/tree_view.py @@ -187,6 +187,9 @@ class TreeModel(QAbstractItemModel): selected_files_folders=None, parent=None, ): + files_with_attributes.sort(key=lambda x: x[2].upper()) # Sorts tuples by name ignoring case + files_with_attributes.sort(key=lambda x: x[0] != 0) # Pushes folders (size zero) to start of list + super(TreeModel, self).__init__(parent) self.rootItem = FolderItem(