From: Christian Heller Date: Thu, 24 Oct 2024 11:21:42 +0000 (+0200) Subject: Browser.py: For by_1st layout, ignore single-value sorters. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/decks?a=commitdiff_plain;h=a3d3825c259985e617928fcd36aae38c85fa451c;p=stable_plom Browser.py: For by_1st layout, ignore single-value sorters. --- 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: