From a3d3825c259985e617928fcd36aae38c85fa451c Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 24 Oct 2024 13:21:42 +0200 Subject: [PATCH] Browser.py: For by_1st layout, ignore single-value sorters. --- browser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/browser.py b/browser.py index 0b8e9d7..223f118 100755 --- a/browser.py +++ b/browser.py @@ -816,8 +816,9 @@ class Gallery: self._show_dirs = False sort_attrs = [] for sorter in reversed(self._sort_order): - sort_attrs += [(sorter.name, - self.items_attrs[sorter.name]['incl'])] + vals = self.items_attrs[sorter.name]['incl'] + if len(vals) > 1: + sort_attrs += [(sorter.name, vals)] self._per_row = len(sort_attrs[-1][1]) build_rows_by_attrs(sort_attrs, entries_filtered) else: -- 2.30.2