Only run word counter when a document is open

This commit is contained in:
Veronica K. B. Olsen
2020-10-25 14:14:40 +01:00
parent d5ec44a2b8
commit cde0d6dff5
+3
View File
@@ -1004,6 +1004,9 @@ class GuiDocEditor(QTextEdit):
"""Decide whether to run the word counter, or not due to
inactivity.
"""
if self.theHandle is None:
return
if self.wCounter.isRunning():
logger.verbose("Word counter is busy")
return