From 6edb18cde9a4a9754cda0e9d84f20316f630a453 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 21 Jun 2026 15:08:40 +0200 Subject: [PATCH] Allow Start to restart a finished Sud from the beginning start() only allowed a fresh run from IDLE, so once a brew reached DONE, clicking Start again (the GUI correctly re-enables it once not running) was silently a no-op. DONE now restarts the same way IDLE does. --- components/sud.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/sud.py b/components/sud.py index c7ea9df..93a66ca 100644 --- a/components/sud.py +++ b/components/sud.py @@ -140,13 +140,14 @@ class Sud(AttributeChange): } def start(self): - """Starts a fresh run from IDLE, or resumes a paused one - whichever - applies. No-op otherwise.""" + """Starts a fresh run from IDLE or DONE (i.e. restarts from the + beginning once a previous run has finished), or resumes a paused + one - whichever applies. No-op otherwise.""" if self.state == SudState.PAUSED: self.state = self._paused_from self._paused_from = None return - if self.state != SudState.IDLE: + if self.state not in (SudState.IDLE, SudState.DONE): return self.index = -1 self._advance()