Merge branch 'master' of github.com:hmeza/calibre

This commit is contained in:
Hugo Meza 2023-04-28 00:56:28 +02:00
commit 36f336ae3e

View File

@ -1153,10 +1153,9 @@ class BooksView(QTableView): # {{{
elif cc['datatype'] == 'enumeration': elif cc['datatype'] == 'enumeration':
set_item_delegate(colhead, self.cc_enum_delegate) set_item_delegate(colhead, self.cc_enum_delegate)
else: else:
if colhead in self._model.editable_cols: dattr = colhead+'_delegate'
dattr = colhead+'_delegate' delegate = colhead if hasattr(self, dattr) else 'text'
delegate = colhead if hasattr(self, dattr) else 'text' set_item_delegate(colhead, getattr(self, delegate+'_delegate'))
set_item_delegate(colhead, getattr(self, delegate+'_delegate'))
self.restore_state() self.restore_state()
self.set_ondevice_column_visibility() self.set_ondevice_column_visibility()