The replace text method should only be used for large documents
This commit is contained in:
@@ -393,11 +393,13 @@ class GuiDocEditor(QTextEdit):
|
|||||||
|
|
||||||
logger.verbose("Running spell checker")
|
logger.verbose("Running spell checker")
|
||||||
if self.spellCheck:
|
if self.spellCheck:
|
||||||
theText = self.getText()
|
|
||||||
self.clear()
|
|
||||||
bfTime = time()
|
bfTime = time()
|
||||||
qApp.setOverrideCursor(QCursor(Qt.WaitCursor))
|
qApp.setOverrideCursor(QCursor(Qt.WaitCursor))
|
||||||
self.setPlainText(theText)
|
if self.bigDoc:
|
||||||
|
theText = self.getText()
|
||||||
|
self.setPlainText(theText)
|
||||||
|
else:
|
||||||
|
self.hLight.rehighlight()
|
||||||
qApp.restoreOverrideCursor()
|
qApp.restoreOverrideCursor()
|
||||||
afTime = time()
|
afTime = time()
|
||||||
logger.debug("Document re-highlighted in %.3f milliseconds" % (1000*(afTime-bfTime)))
|
logger.debug("Document re-highlighted in %.3f milliseconds" % (1000*(afTime-bfTime)))
|
||||||
|
|||||||
Reference in New Issue
Block a user