From f6a94985b286a410bf6ec81fba48345f02158dfa Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 24 Aug 2024 07:58:49 +0200 Subject: [PATCH] Preverse previous sort order where new one would not make a difference. --- browser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser.py b/browser.py index f288626..3d43d05 100755 --- a/browser.py +++ b/browser.py @@ -133,8 +133,8 @@ class Window(Gtk.ApplicationWindow): def sort(self, attr_name): self.list_store.remove_all() - for file_item in sorted(self.unsorted, - key=lambda i: getattr(i, attr_name)): + self.unsorted.sort(key=lambda i: getattr(i, attr_name)) + for file_item in self.unsorted: self.list_store.append(file_item) self.update_selected() -- 2.30.2