From 52e3f533333c6d755cd3aa1c16af92ae4d47f74b Mon Sep 17 00:00:00 2001 From: Jordan Ruthe Date: Thu, 18 Feb 2021 12:34:35 -0500 Subject: [PATCH] screen: Add transition for paused state (mainly for startup) --- screen.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/screen.py b/screen.py index b5ec7f58..ac85ab49 100644 --- a/screen.py +++ b/screen.py @@ -182,6 +182,7 @@ class KlipperScreen(Gtk.Window): self.printer.set_callbacks({ "disconnected": self.state_disconnected, "error": self.state_error, + "paused": self.state_paused, "printing": self.state_printing, "ready": self.state_ready, "startup": self.state_startup, @@ -483,10 +484,13 @@ class KlipperScreen(Gtk.Window): _("Klipper has encountered an error.") ) + def state_paused(self): + if "job_status" not in self._cur_panels: + self.printer_printing() + def state_printing(self): - if "job_status" in self._cur_panels: - return - self.printer_printing() + if "job_status" not in self._cur_panels: + self.printer_printing() def state_ready(self): # Do not return to main menu if completing a job, timeouts/user input will return