diff --git a/src/calibre/gui2/library.py b/src/calibre/gui2/library.py index 97d66c3856..8b47de78bc 100644 --- a/src/calibre/gui2/library.py +++ b/src/calibre/gui2/library.py @@ -296,16 +296,17 @@ class BooksModel(QAbstractTableModel): def read_config(self): self.use_roman_numbers = config['use_roman_numerals_for_series_number'] - self.column_map = config['column_map'][:] # force a copy + cmap = config['column_map'][:] # force a copy self.headers = {} - for i in self.column_map: # take out any columns no longer in the db - if not i in self.orig_headers and not i in self.custom_columns: - self.column_map.remove(i) - for i in self.column_map: - if i in self.orig_headers: - self.headers[i] = self.orig_headers[i] - elif i in self.custom_columns: - self.headers[i] = self.custom_columns[i]['name'] + self.column_map = [] + for col in cmap: # take out any columns no longer in the db + if col in self.orig_headers or col in self.custom_columns: + self.column_map.append(col) + for col in self.column_map: + if col in self.orig_headers: + self.headers[col] = self.orig_headers[col] + elif col in self.custom_columns: + self.headers[col] = self.custom_columns[col]['name'] self.build_data_convertors() self.reset() self.emit(SIGNAL('columns_sorted()')) diff --git a/src/calibre/gui2/main.ui b/src/calibre/gui2/main.ui index 8dcb0e6d75..29292747f8 100644 --- a/src/calibre/gui2/main.ui +++ b/src/calibre/gui2/main.ui @@ -157,6 +157,30 @@ 0 + + + + &Restrict to: + + + search_restriction + + + + + + + Books display will be restricted to those matching the selected saved search + + + + + + + set in ui.py + + + @@ -206,13 +230,6 @@ - - - - set in ui.py - - - @@ -336,69 +353,38 @@ - - - Sort by &popularity + + + Sort by &popularity + + + + + + + 0 + + + Match any + + + + + Match all + + - - - - - 0 - - - - Match any - - - - - Match all - - - - - - - - Create, edit, and delete user categories - - - Manage &user categories - - - - - - - - - - - &Restrict to: - - - search_restriction - - - - - - - - 50 - 0 - - - - Books display will be restricted to those matching the selected saved search - - - - + + + Create, edit, and delete user categories + + + Manage &user categories + +