Fix bug in bulk edit CC enum types where if all but the last are None, the combo box shows the last value and the others cannot be set.

This commit is contained in:
Charles Haley 2011-01-19 15:00:52 +00:00
parent 519cd869ac
commit 35c319f115

View File

@ -599,7 +599,7 @@ class BulkEnumeration(BulkBase, Enumeration):
value = None
ret_value = None
dialog_shown = False
for book_id in book_ids:
for i,book_id in enumerate(book_ids):
val = self.db.get_custom(book_id, num=self.col_id, index_is_id=True)
if val and val not in self.col_metadata['display']['enum_values']:
if not dialog_shown:
@ -610,7 +610,7 @@ class BulkEnumeration(BulkBase, Enumeration):
show=True, show_copy_button=False)
dialog_shown = True
ret_value = ' nochange '
elif value is not None and value != val:
elif (value is not None and value != val) or (val and i != 0):
ret_value = ' nochange '
value = val
if ret_value is None: