temp: do not change preheat selections while in the numpad

it's possible to just use one selection list and unselect the rest,
but i think that there is some benefit in usability keeping the selections separated
This commit is contained in:
alfrix 2022-08-26 09:46:31 -03:00 committed by Alfredo Monclus
parent 2902e95068
commit d1604c68d6

View File

@ -222,17 +222,18 @@ class TemperaturePanel(ScreenPanel):
self.hide_numpad()
def select_heater(self, widget, device):
if 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")
self.devices[device]['select'].set_label(_("Select"))
logging.info(f"Deselecting {device}")
return
self.active_heaters.append(device)
self.devices[device]['name'].get_style_context().add_class("button_active")
self.devices[device]['select'].set_label(_("Deselect"))
logging.info(f"Seselecting {device}")
if self.active_heater is None:
if 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")
self.devices[device]['select'].set_label(_("Select"))
logging.info(f"Deselecting {device}")
return
self.active_heaters.append(device)
self.devices[device]['name'].get_style_context().add_class("button_active")
self.devices[device]['select'].set_label(_("Deselect"))
logging.info(f"Seselecting {device}")
return
def set_temperature(self, widget, setting):