mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix (?) for custom column text delegate.
This commit is contained in:
parent
4730816948
commit
4504fb82fe
@ -249,8 +249,13 @@ class CcTextDelegate(QStyledItemDelegate): # {{{
|
||||
complete_items = sorted(list(m.db.all_custom(label=m.db.field_metadata.key_to_label(col))),
|
||||
key=sort_key)
|
||||
editor.update_items_cache(complete_items)
|
||||
ct = index.data(Qt.DisplayRole).toString()
|
||||
editor.show_initial_value(ct)
|
||||
return editor
|
||||
|
||||
def setModelData(self, editor, model, index):
|
||||
val = editor.text()
|
||||
model.setData(index, QVariant(val), Qt.EditRole)
|
||||
# }}}
|
||||
|
||||
class CcNumberDelegate(QStyledItemDelegate): # {{{
|
||||
|
Loading…
x
Reference in New Issue
Block a user