From 1978d50e7e9ed7f99ddc2469329797f3e6043348 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Wed, 17 Jun 2020 22:39:01 +0200 Subject: [PATCH] Some minor cleanup in doceditor --- nw/gui/doceditor.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index efe863a7..ab76adfb 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -78,6 +78,9 @@ class GuiDocEditor(QTextEdit): self.bigDoc = False self.nonWord = "\"'" + # Document State + self.hasSelection = False + # Typography self.typDQOpen = self.mainConf.fmtDoubleQuotes[0] self.typDQClose = self.mainConf.fmtDoubleQuotes[1] @@ -86,7 +89,6 @@ class GuiDocEditor(QTextEdit): # Core Elements self.qDocument = self.document() - self.qDocument.setDocumentMargin(self.mainConf.getTextMargin()) self.qDocument.contentsChange.connect(self._docChange) # Document Title @@ -100,8 +102,7 @@ class GuiDocEditor(QTextEdit): self.setContextMenuPolicy(Qt.CustomContextMenu) self.customContextMenuRequested.connect(self._openContextMenu) - # Editor State - self.hasSelection = False + # Editor Settings self.setMinimumWidth(self.mainConf.pxInt(300)) self.setAutoFillBackground(True) self.setAcceptRichText(False)