From 07714168ffa9e245fc6a7f2b10c2e458b9b75aa1 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Thu, 14 May 2020 21:19:03 +0200 Subject: [PATCH] Fixed an issue with rendering large documents where some of the text wasn't visible --- nw/gui/elements/doceditor.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nw/gui/elements/doceditor.py b/nw/gui/elements/doceditor.py index 96966ddd..78f07c4c 100644 --- a/nw/gui/elements/doceditor.py +++ b/nw/gui/elements/doceditor.py @@ -289,7 +289,9 @@ class GuiDocEditor(QTextEdit): return def saveText(self): - + """Save the text currently in the editor to the NWDoc object, + and update the NWItem meta data. + """ if self.nwDocument.theItem is None: return False @@ -348,7 +350,11 @@ class GuiDocEditor(QTextEdit): self.qDocument.blockSignals(True) self.qDocument.rootFrame().setFrameFormat(docFormat) self.qDocument.blockSignals(False) - self.qDocument.contentsChange.emit(0,0,0) + + # The line below causes issues with large documents as it + # triggers an early repaint that seems to only render a part of + # the document. Leaving it here as a warning for now. + # self.qDocument.contentsChange.emit(0,0,0) return