From 504d3956611d4742980a97e15a2a9810667ea9aa Mon Sep 17 00:00:00 2001 From: alfrix Date: Sat, 23 Apr 2022 11:57:52 -0300 Subject: [PATCH] temperature: fix issue with the new cooldown preheat setting --- panels/temperature.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panels/temperature.py b/panels/temperature.py index 35e70251..50c6d944 100644 --- a/panels/temperature.py +++ b/panels/temperature.py @@ -255,7 +255,7 @@ class TemperaturePanel(ScreenPanel): logging.info("Setting %s to %d" % (heater, target)) else: self._screen.show_popup_message(_("Can't set above the maximum:") + (" %s" % MAX_TEMP)) - if self.preheat_options[setting]['gcode']: + if setting in self.preheat_options and self.preheat_options[setting]['gcode']: # This small delay is needed to properly update the target if the user configured something above # and then changed the target again using the preheat gcode GLib.timeout_add(250, self.preheat_gcode, setting)