mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-21 10:46:05 +01:00
Fix (?) for custom column text delegate.
This commit is contained in:
parent
4730816948
commit
4504fb82fe
1 changed files with 5 additions and 0 deletions
|
|
@ -249,8 +249,13 @@ def createEditor(self, parent, option, index):
|
|||
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…
Reference in a new issue