mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 11:22:28 +12:00
stop crash when click btnGoUp and current editor is None
This commit is contained in:
parent
43c077552a
commit
4638ba878f
|
@ -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):
|
||||
|
||||
|
|
Loading…
Reference in a new issue