Added a hidden handle column to the outline tree, and connected the double click to open a document

This commit is contained in:
Veronica K. B. Olsen
2020-04-26 17:48:14 +02:00
parent 7c2ca13e4f
commit 946331145f
5 changed files with 67 additions and 23 deletions
+4 -2
View File
@@ -452,11 +452,13 @@ class GuiMain(QMainWindow):
self.docEditor.clearEditor()
return True
def openDocument(self, tHandle):
def openDocument(self, tHandle, tLine=None):
"""Open a specific document, optionally at a given line.
"""
if self.hasProject:
self.closeDocument()
self.tabWidget.setCurrentWidget(self.splitView)
if self.docEditor.loadText(tHandle):
if self.docEditor.loadText(tHandle, tLine):
self.docEditor.setFocus()
self.theProject.setLastEdited(tHandle)
else: