Remove doc word count from main statusbar, and added support for session word count for documents

This commit is contained in:
Veronica K. B. Olsen
2020-06-27 19:41:41 +02:00
parent 7d30a2c044
commit 243d9dd85a
4 changed files with 21 additions and 36 deletions
+11 -4
View File
@@ -53,10 +53,11 @@ class NWItem():
self.isExported = True
# Document Meta Data
self.charCount = 0
self.wordCount = 0
self.paraCount = 0
self.cursorPos = 0
self.charCount = 0 # Current character count
self.wordCount = 0 # Current word count
self.paraCount = 0 # Current paragraph count
self.initCount = 0 # Initial word count
self.cursorPos = 0 # Last cursor position
return
@@ -274,4 +275,10 @@ class NWItem():
self.cursorPos = checkInt(thePosition, 0)
return
def saveInitialCount(self):
"""Set the initial word count.
"""
self.initCount = self.wordCount
return
# END Class NWItem
+1
View File
@@ -134,6 +134,7 @@ class NWTree():
nwItem = NWItem(self.theProject)
if nwItem.unpackXML(xItem):
self.append(nwItem.itemHandle, nwItem.parHandle, nwItem)
nwItem.saveInitialCount()
return True