screen: Add transition for paused state (mainly for startup)
This commit is contained in:
parent
693c45e2d7
commit
52e3f53333
@ -182,6 +182,7 @@ class KlipperScreen(Gtk.Window):
|
|||||||
self.printer.set_callbacks({
|
self.printer.set_callbacks({
|
||||||
"disconnected": self.state_disconnected,
|
"disconnected": self.state_disconnected,
|
||||||
"error": self.state_error,
|
"error": self.state_error,
|
||||||
|
"paused": self.state_paused,
|
||||||
"printing": self.state_printing,
|
"printing": self.state_printing,
|
||||||
"ready": self.state_ready,
|
"ready": self.state_ready,
|
||||||
"startup": self.state_startup,
|
"startup": self.state_startup,
|
||||||
@ -483,9 +484,12 @@ class KlipperScreen(Gtk.Window):
|
|||||||
_("Klipper has encountered an error.")
|
_("Klipper has encountered an error.")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def state_paused(self):
|
||||||
|
if "job_status" not in self._cur_panels:
|
||||||
|
self.printer_printing()
|
||||||
|
|
||||||
def state_printing(self):
|
def state_printing(self):
|
||||||
if "job_status" in self._cur_panels:
|
if "job_status" not in self._cur_panels:
|
||||||
return
|
|
||||||
self.printer_printing()
|
self.printer_printing()
|
||||||
|
|
||||||
def state_ready(self):
|
def state_ready(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user