From f4decae77f0971d9b4cc73def5a6c6c18d81154c Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Wed, 10 Apr 2024 23:44:43 +0200 Subject: [PATCH] Simplify status class counter reset --- novelwriter/core/status.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/novelwriter/core/status.py b/novelwriter/core/status.py index 8909cc98..cde8bf02 100644 --- a/novelwriter/core/status.py +++ b/novelwriter/core/status.py @@ -153,8 +153,8 @@ class NWStatus: def resetCounts(self) -> None: """Clear the counts of references to the status entries.""" - for key in self._store: - self._store[key].count = 0 + for entry in self._store.values(): + entry.count = 0 return def increment(self, key: str | None) -> None: