From 20ff46b8d22346b0e75f779c009446c5087934ac Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Thu, 11 Jun 2020 18:02:23 +0200 Subject: [PATCH] Fixed issue with following tag link when doc viewer is closed. --- nw/gui/docviewer.py | 5 ++++- nw/gui/outlinedetails.py | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nw/gui/docviewer.py b/nw/gui/docviewer.py index c3bfc51b..a2884dab 100644 --- a/nw/gui/docviewer.py +++ b/nw/gui/docviewer.py @@ -188,7 +188,10 @@ class GuiDocViewer(QTextBrowser): ) % theTag, nwAlert.ERROR) return else: - self.loadText(tHandle) + # Let the parent handle the opening as it also ensures that + # the doc view panel is visible in case this request comes + # from outside this class. + self.theParent.viewDocument(tHandle) self.navigateTo("#head_%s:%s" % (tHandle, sTitle)) return True diff --git a/nw/gui/outlinedetails.py b/nw/gui/outlinedetails.py index 9a010559..5e197449 100644 --- a/nw/gui/outlinedetails.py +++ b/nw/gui/outlinedetails.py @@ -277,7 +277,6 @@ class GuiOutlineDetails(QScrollArea): theBits = theLink.split("=") if len(theBits) == 2: self.theParent.docViewer.loadFromTag(theBits[1]) - self.theParent.tabWidget.setCurrentWidget(self.theParent.splitView) return ##