Re-implement basic novel view functionality

This commit is contained in:
Veronica Berglyd Olsen
2025-02-22 21:54:24 +01:00
parent 9a63a84fc1
commit 71ad7c3229
5 changed files with 153 additions and 117 deletions
+1 -1
View File
@@ -1022,7 +1022,7 @@ class GuiProjectTree(QTreeView):
return [i for i in self.selectedIndexes() if i.column() == 0]
def _getModel(self) -> ProjectModel | None:
"""Return a project node corresponding to a model index."""
"""Return the model, if it exists."""
if isinstance(model := self.model(), ProjectModel):
return model
return None