base_panel: fix #572

This commit is contained in:
alfrix committed 2022-04-05 19:57:38 -03:00
1 parent 013b50985f
commit dd72e7d46a
1 file changed
+3 -2
+3 -2
View File
@@ -255,8 +255,9 @@ class BasePanel(ScreenPanel):
name = device.split(" ")[1:][0].capitalize().replace("_", " ") + ": "
elif self.titlebar_name_type == "short":
name = device.split(" ")[1:][0][:1].upper() + ": "
self.labels[device].set_label("%s%d°" % (name,
round(self._printer.get_dev_stat(device, "temperature"))))
temp = self._printer.get_dev_stat(device, "temperature")
if temp is not None:
self.labels[device].set_label("%s%d°" % (name, round(temp)))
if "toolhead" in data and "extruder" in data["toolhead"]:
if data["toolhead"]["extruder"] != self.current_extruder: