Fix a regression in the previous release that caused the completion popups for some custom column types int he book list to stop working. Fixes #1612640 [Editing user defined column directly in a table cell does not display a combo with existing values anymore](https://bugs.launchpad.net/calibre/+bug/1612640)

This commit is contained in:
Kovid Goyal 2016-08-12 20:15:33 +05:30
parent 101d22f0b4
commit 07c614f897

View File

@ -458,7 +458,7 @@ class CcTextDelegate(QStyledItemDelegate, UpdateEditorGeometry): # {{{
m = index.model() m = index.model()
col = m.column_map[index.column()] col = m.column_map[index.column()]
key = m.db.field_metadata.key_to_label(col) key = m.db.field_metadata.key_to_label(col)
if m.db.field_metadata[col]['is_multiple']: if m.db.field_metadata[col]['datatype'] != 'comments':
editor = EditWithComplete(parent) editor = EditWithComplete(parent)
editor.set_separator(None) editor.set_separator(None)
complete_items = sorted(list(m.db.all_custom(label=key)), key=sort_key) complete_items = sorted(list(m.db.all_custom(label=key)), key=sort_key)