This commit is contained in:
Kovid Goyal 2023-04-27 20:37:17 +05:30
commit c2888b10bb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

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