Fix exception in preferences when standard columns are hidden

This commit is contained in:
Charles Haley 2010-05-07 09:45:21 +01:00
commit f604ee58a4
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
__appname__ = 'calibre' __appname__ = 'calibre'
__version__ = '0.6.51' __version__ = '0.6.90'
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>" __author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
import re import re

View File

@ -370,7 +370,7 @@ class ConfigDialog(ResizableDialog, Ui_Dialog):
[i for i in ac if i not in cm] + \ [i for i in ac if i not in cm] + \
[i for i in self.custcols if i not in cm]: [i for i in self.custcols if i not in cm]:
if col in ALL_COLUMNS: if col in ALL_COLUMNS:
item = QListWidgetItem(model.headers[col], self.columns) item = QListWidgetItem(model.orig_headers[col], self.columns)
else: else:
item = QListWidgetItem(self.custcols[col]['name'], self.columns) item = QListWidgetItem(self.custcols[col]['name'], self.columns)
item.setData(Qt.UserRole, QVariant(col)) item.setData(Qt.UserRole, QVariant(col))