temperature: fix #763

This commit is contained in:
alfrix committed 2022-10-26 22:36:52 -03:00
1 parent d6e4ad0a35
commit b36e75ec1a
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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
+1 -1
View File
@@ -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")