The replace text method should only be used for large documents

This commit is contained in:
Veronica K. B. Olsen
2019-11-27 00:58:52 +01:00
parent 9ab64627f3
commit a2defebe94
+5 -3
View File
@@ -393,11 +393,13 @@ class GuiDocEditor(QTextEdit):
logger.verbose("Running spell checker")
if self.spellCheck:
theText = self.getText()
self.clear()
bfTime = time()
qApp.setOverrideCursor(QCursor(Qt.WaitCursor))
self.setPlainText(theText)
if self.bigDoc:
theText = self.getText()
self.setPlainText(theText)
else:
self.hLight.rehighlight()
qApp.restoreOverrideCursor()
afTime = time()
logger.debug("Document re-highlighted in %.3f milliseconds" % (1000*(afTime-bfTime)))