From 362da679b6c95e515442b207fc9e0f4528fe0f9f Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 4 Jan 2025 01:38:06 +0100 Subject: [PATCH] Fix minor issue introduced by selection counter update --- novelwriter/gui/doceditor.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/novelwriter/gui/doceditor.py b/novelwriter/gui/doceditor.py index 65757448..c95023d9 100644 --- a/novelwriter/gui/doceditor.py +++ b/novelwriter/gui/doceditor.py @@ -1251,10 +1251,11 @@ class GuiDocEditor(QPlainTextEdit): self._nwItem.setCharCount(cCount) self._nwItem.setWordCount(wCount) self._nwItem.setParaCount(pCount) - if needsRefresh and not self.textCursor().hasSelection(): - # Selection counter should take precedence (#2155) + if needsRefresh: self._nwItem.notifyToRefresh() - self.docFooter.updateWordCount(wCount, False) + if not self.textCursor().hasSelection(): + # Selection counter should take precedence (#2155) + self.docFooter.updateWordCount(wCount, False) return @pyqtSlot()