Fix regression that broke sort_columns_at_startup twek in 0.7.36

This commit is contained in:
Kovid Goyal 2011-01-02 11:14:48 -07:00
parent 59b476a8b2
commit bd4f65258d

View File

@ -386,7 +386,12 @@ class BooksView(QTableView): # {{{
old_state = self.get_default_state() old_state = self.get_default_state()
if tweaks['sort_columns_at_startup'] is not None: 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) self.apply_state(old_state)