From bd4f65258dd66ab6383c582ac4b61274ebba86d5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 2 Jan 2011 11:14:48 -0700 Subject: [PATCH] Fix regression that broke sort_columns_at_startup twek in 0.7.36 --- src/calibre/gui2/library/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py index 322199a4f9..c1dd5b3766 100644 --- a/src/calibre/gui2/library/views.py +++ b/src/calibre/gui2/library/views.py @@ -386,7 +386,12 @@ class BooksView(QTableView): # {{{ old_state = self.get_default_state() if tweaks['sort_columns_at_startup'] is not None: - old_state['sort_history'] = tweaks['sort_columns_at_startup'] + sh = [] + for c,d in tweaks['sort_columns_at_startup']: + if not isinstance(d, bool): + d = True if d == 0 else False + sh.append((c, d)) + old_state['sort_history'] = sh self.apply_state(old_state)