Restore novel heading details tooltip and active row colouring

This commit is contained in:
Veronica Berglyd Olsen
2025-02-22 23:13:57 +01:00
parent 71ad7c3229
commit 43e420ab0b
4 changed files with 83 additions and 69 deletions
+4 -2
View File
@@ -84,8 +84,10 @@ class NovelModel(QAbstractTableModel):
def data(self, index: QModelIndex, role: Qt.ItemDataRole) -> T_NodeData:
"""Return display data for a node."""
if index.isValid() and (row := index.row()) < len(self._rows):
return self._rows[row].get(C_FACTOR*index.column() | role)
try:
return self._rows[index.row()].get(C_FACTOR*index.column() | role)
except Exception:
print("NovelModel Debug: Oops!")
return None
def keys(self, index: QModelIndex) -> tuple[str | None, str | None]: