Count words when saving editor text
This commit is contained in:
@@ -360,9 +360,14 @@ class GuiDocEditor(QTextEdit):
|
||||
return False
|
||||
|
||||
docText = self.getText()
|
||||
|
||||
cC, wC, pC = countWords(docText)
|
||||
self._updateCounts(cC, wC, pC)
|
||||
|
||||
theItem.setCharCount(self.charCount)
|
||||
theItem.setWordCount(self.wordCount)
|
||||
theItem.setParaCount(self.paraCount)
|
||||
|
||||
self.saveCursorPosition()
|
||||
self.nwDocument.saveDocument(docText)
|
||||
self.setDocumentChanged(False)
|
||||
|
||||
Reference in New Issue
Block a user