From de252643c1ae2f8b9bdc5166a39e5d4585b32587 Mon Sep 17 00:00:00 2001 From: alfrix Date: Sat, 3 Dec 2022 23:11:46 -0300 Subject: [PATCH] do not change the state directly from the callback because it causes double initialization issues --- screen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/screen.py b/screen.py index 3c6b5feb..0109fa90 100755 --- a/screen.py +++ b/screen.py @@ -697,12 +697,12 @@ class KlipperScreen(Gtk.Window): if self.connecting: return if action == "notify_klippy_disconnected": - self.printer.change_state("disconnected") + self.printer.process_update({'webhooks': {'state': "disconnected"}}) return elif action == "notify_klippy_shutdown": - self.printer.change_state("shutdown") + self.printer.process_update({'webhooks': {'state': "shutdown"}}) elif action == "notify_klippy_ready": - self.printer.change_state("ready") + self.printer.process_update({'webhooks': {'state': "ready"}}) elif action == "notify_status_update" and self.printer.state != "shutdown": self.printer.process_update(data) elif action == "notify_filelist_changed":