diff --git a/nw/gui/statusbar.py b/nw/gui/statusbar.py index 8fceafa5..bbebb7cb 100644 --- a/nw/gui/statusbar.py +++ b/nw/gui/statusbar.py @@ -51,9 +51,6 @@ class GuiMainStatus(QStatusBar): self.theTheme = theParent.theTheme self.refTime = None - self.projWords = 0 - self.sessWords = 0 - colNone = QColor(*self.theTheme.statNone) colTrue = QColor(*self.theTheme.statUnsaved) colFalse = QColor(*self.theTheme.statSaved) @@ -182,26 +179,19 @@ class GuiMainStatus(QStatusBar): def setStats(self, pWC, sWC): """Set the current project statistics. """ - self.projWords = pWC - self.sessWords = sWC - self._updateStats() + self.statsText.setToolTip( + "Project word count (session change)" + ) + self.statsText.setText( + f"Words: {pWC:n} ({sWC:+n})" + ) + return ## # Internal Functions ## - def _updateStats(self): - """Update statistics. - """ - self.statsText.setToolTip( - "Project word count (session change)" - ) - self.statsText.setText( - f"Words: {self.projWords:n} ({self.sessWords:+n})" - ) - return - def _updateTime(self): """Update the session clock. """ diff --git a/nw/guimain.py b/nw/guimain.py index b9816c42..cc8f61bd 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -467,7 +467,7 @@ class GuiMain(QMainWindow): return False self.treeView.saveTreeOrder() - self.theProject.saveProject(autoSave) + self.theProject.saveProject(autoSave=autoSave) self.theIndex.saveIndex() return True