From b36e75ec1a06fde07fd2a0ed8700d4fd642252fc Mon Sep 17 00:00:00 2001 From: alfrix Date: Sun, 23 Oct 2022 20:57:47 -0300 Subject: [PATCH] temperature: fix #763 --- panels/base_panel.py | 2 +- panels/temperature.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panels/base_panel.py b/panels/base_panel.py index 6198ea3e..46f20284 100644 --- a/panels/base_panel.py +++ b/panels/base_panel.py @@ -146,7 +146,7 @@ class BasePanel(ScreenPanel): n = 0 if self._screen.printer.get_tools(): self.current_extruder = self._screen.printer.get_stat("toolhead", "extruder") - if self.current_extruder: + if self.current_extruder and f"{self.current_extruder}_box" in self.labels: self.control['temp_box'].add(self.labels[f"{self.current_extruder}_box"]) n += 1 diff --git a/panels/temperature.py b/panels/temperature.py index 0b01f0f2..9f6224db 100644 --- a/panels/temperature.py +++ b/panels/temperature.py @@ -211,7 +211,7 @@ class TemperaturePanel(ScreenPanel): self.hide_numpad() def select_heater(self, widget, device): - if self.active_heater is None and self.devices[device]["can_target"]: + if self.active_heater is None and device in self.devices and self.devices[device]["can_target"]: if device in self.active_heaters: self.active_heaters.pop(self.active_heaters.index(device)) self.devices[device]['name'].get_style_context().remove_class("button_active")