It should now be possible to navigate to positions within the documents when clicking links in various places

This commit is contained in:
Veronica K. B. Olsen
2020-05-25 23:31:41 +02:00
parent b3e4af1394
commit 4340b6b8b5
4 changed files with 40 additions and 52 deletions
+2 -2
View File
@@ -485,7 +485,7 @@ class GuiMain(QMainWindow):
self.docEditor.saveText()
return True
def viewDocument(self, tHandle=None, nLine=0):
def viewDocument(self, tHandle=None, navLink=None):
"""Load a document for viewing in the view panel.
"""
if tHandle is None:
@@ -511,7 +511,7 @@ class GuiMain(QMainWindow):
vPos[0] = int(bPos[1]/2)
vPos[1] = bPos[1]-vPos[0]
self.splitView.setSizes(vPos)
self.docViewer.setCursorLine(nLine)
self.docViewer.navigateTo(navLink)
return True