screen: Deleted instantied panels so that Klipper config changes will be reflected

This commit is contained in:
Jordan Ruthe 2021-05-20 00:16:01 -04:00
parent 00ec1a668e
commit db166f97e4

@ -530,6 +530,11 @@ class KlipperScreen(Gtk.Window):
logging.debug("### Going to disconnected") logging.debug("### Going to disconnected")
self.printer_initializing(_("Klipper has disconnected")) self.printer_initializing(_("Klipper has disconnected"))
for panel in list(self.panels):
if panel in ["printer_select","splash_screen"]:
continue
del self.panels[panel]
def state_error(self, prev_state): def state_error(self, prev_state):
if "printer_select" in self._cur_panels: if "printer_select" in self._cur_panels:
self.printer_select_callbacks = [self.state_error] self.printer_select_callbacks = [self.state_error]
@ -550,6 +555,11 @@ class KlipperScreen(Gtk.Window):
_("Klipper has encountered an error.") _("Klipper has encountered an error.")
) )
for panel in list(self.panels):
if panel in ["printer_select","splash_screen"]:
continue
del self.panels[panel]
def state_paused(self, prev_state): def state_paused(self, prev_state):
if "job_status" not in self._cur_panels: if "job_status" not in self._cur_panels:
self.printer_printing() self.printer_printing()