From 35c319f115656182addca7030340dd9b713adfc1 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Wed, 19 Jan 2011 15:00:52 +0000 Subject: [PATCH] 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. --- src/calibre/gui2/custom_column_widgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/custom_column_widgets.py b/src/calibre/gui2/custom_column_widgets.py index d80909c4bb..58985d1121 100644 --- a/src/calibre/gui2/custom_column_widgets.py +++ b/src/calibre/gui2/custom_column_widgets.py @@ -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: