diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index 03f6b622..91a4b255 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -416,7 +416,9 @@ class GuiDocEditor(QTextEdit): self.theIndex.scanText(tHandle, docText) if self._updateHeaders(checkLevel=True): - self.theParent.novelView.refreshTree() + if self.theParent.projTabs.currentIndex() == self.theParent.idxNovelView: + logger.verbose("Document headers have changed, updating novel tree") + self.theParent.novelView.refreshTree() else: self.theParent.novelView.updateWordCounts(tHandle)