Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Feb 10, 2025
1 parent a7a00de commit 8f44ab8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/calibre/gui2/library/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,8 @@ def keyPressEvent(self, ev):
return
if ev.key() == Qt.Key.Key_F2:
key = self.column_map[self.currentIndex().column()]
if self._model.db.field_metadata[key]['datatype'] == 'composite':
db = self.model().db
if hasattr(db, 'field_metadata') and db.field_metadata[key]['datatype'] == 'composite':
self.cc_template_delegate.allow_one_edit()
return QTableView.keyPressEvent(self, ev)

Expand Down

0 comments on commit 8f44ab8

Please sign in to comment.