From 747ff63a9247db4bb4c2c6d497f104f8da83de0c Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 19 Jun 2020 23:01:22 +0200 Subject: [PATCH] Also save first if pressing the relaod button from the doc viewer header bar --- nw/gui/docviewer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nw/gui/docviewer.py b/nw/gui/docviewer.py index b280aa01..93887fdf 100644 --- a/nw/gui/docviewer.py +++ b/nw/gui/docviewer.py @@ -529,6 +529,8 @@ class GuiDocViewHeader(QWidget): def _refreshDocument(self): """Reload the content of the document. """ + if self.docViewer.theHandle == self.theParent.docEditor.theHandle: + self.theParent.saveDocument() self.docViewer.reloadText() return