diff --git a/manuskript/ui/editors/mainEditor.py b/manuskript/ui/editors/mainEditor.py index 34557c8..305b963 100644 --- a/manuskript/ui/editors/mainEditor.py +++ b/manuskript/ui/editors/mainEditor.py @@ -197,8 +197,9 @@ class mainEditor(QWidget, Ui_mainEditor): self.setCurrentModelIndex(i, newTab) def goToParentItem(self): - idx = self.currentEditor().currentIndex - self.mw.treeRedacOutline.setCurrentIndex(idx.parent()) + if self.currentEditor(): + idx = self.currentEditor().currentIndex + self.mw.treeRedacOutline.setCurrentIndex(idx.parent()) def setCurrentModelIndex(self, index, newTab=False, tabWidget=None):