diff --git a/nw/gui/build.py b/nw/gui/build.py index c13a3911..0370e23c 100644 --- a/nw/gui/build.py +++ b/nw/gui/build.py @@ -1040,9 +1040,7 @@ class GuiBuildNovelDocView(QTextBrowser): # This forces a repaint of the text, It's a hack to fix an occational # issue where the find/replace above interfers with the rendering and # leaves parts of the document blank. - textWidth = self.qDocument.textWidth() - self.qDocument.setTextWidth(textWidth - 5) - self.qDocument.setTextWidth(textWidth) + self.qDocument.setTextWidth(self.qDocument.textWidth()) return diff --git a/nw/gui/docviewer.py b/nw/gui/docviewer.py index 0f7e81cd..63a41e9b 100644 --- a/nw/gui/docviewer.py +++ b/nw/gui/docviewer.py @@ -183,9 +183,7 @@ class GuiDocViewer(QTextBrowser): # This forces a repaint of the text, It's a hack to fix an occational # issue where the find/replace above interfers with the rendering and # leaves parts of the document blank. - textWidth = self.qDocument.textWidth() - self.qDocument.setTextWidth(textWidth - 5) - self.qDocument.setTextWidth(textWidth) + self.qDocument.setTextWidth(self.qDocument.textWidth()) return True