Drop the total word count value in the XML and rewrite how counts are handled

This commit is contained in:
Veronica Berglyd Olsen
2022-11-01 12:21:16 +01:00
parent 6fd7107675
commit 0cfaf4f021
12 changed files with 59 additions and 82 deletions
+6 -6
View File
@@ -1559,13 +1559,13 @@ class GuiMain(QMainWindow):
self.theProject.updateWordCounts()
if self.mainConf.incNotesWCount:
currWords = self.theProject.data.getCurrCount("total")
diffWords = currWords - self.theProject.data.getLastCount("total")
iTotal = sum(self.theProject.data.initCounts)
cTotal = sum(self.theProject.data.currCounts)
self.mainStatus.setProjectStats(cTotal, cTotal - iTotal)
else:
currWords = self.theProject.data.getCurrCount("novel")
diffWords = currWords - self.theProject.data.getLastCount("novel")
self.mainStatus.setProjectStats(currWords, diffWords)
iNovel, _ = self.theProject.data.initCounts
cNovel, _ = self.theProject.data.currCounts
self.mainStatus.setProjectStats(cNovel, cNovel - iNovel)
return