Fix bug in applying changes to the downloaded fields in the metadata sources preferences

This commit is contained in:
Kovid Goyal 2011-04-26 22:41:01 -06:00
parent ff3c857c80
commit e60506d355

View File

@ -209,8 +209,11 @@ class FieldsModel(QAbstractListModel): # {{{
return ret
def commit(self):
val = [k for k, v in self.overrides.iteritems() if v == Qt.Unchecked]
msprefs['ignore_fields'] = val
ignored_fields = set([x for x in msprefs['ignore_fields'] if x not in
self.overrides])
changed = set([k for k, v in self.overrides.iteritems() if v ==
Qt.Unchecked])
msprefs['ignore_fields'] = list(ignored_fields.union(changed))
# }}}