stop crash when click btnGoUp and current editor is None

This commit is contained in:
Windspar 2018-02-18 14:06:33 -05:00
parent 43c077552a
commit 4638ba878f

View file

@ -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):