base_panel: fix issue with panel not loading during shutdown status

This commit is contained in:
alfrix committed 2024-02-01 12:15:29 -03:00
1 parent 3ee20617cd
commit 6ee52f13e8
1 file changed
+1 -1
+1 -1
View File
@@ -228,7 +228,7 @@ class BasePanel(ScreenPanel):
name = f"{name[:1].upper()}: "
self.labels[device].set_label(f"{name}{int(temp)}°")
if (self.current_extruder is not False and 'toolhead' in data and 'extruder' in data['toolhead']
if (self.current_extruder and 'toolhead' in data and 'extruder' in data['toolhead']
and data["toolhead"]["extruder"] != self.current_extruder):
self.control['temp_box'].remove(self.labels[f"{self.current_extruder}_box"])
self.current_extruder = data["toolhead"]["extruder"]