From c57915ef191f84f22df086fd23932ea7ad6b7dc5 Mon Sep 17 00:00:00 2001 From: alfrix Date: Wed, 24 Aug 2022 11:20:44 -0300 Subject: [PATCH] temp: fix styling not updating when entering and exiting numpad --- panels/temperature.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/panels/temperature.py b/panels/temperature.py index ee428eea..8fa8fdeb 100644 --- a/panels/temperature.py +++ b/panels/temperature.py @@ -446,6 +446,9 @@ class TemperaturePanel(ScreenPanel): self.devices[self.active_heater]['name'].get_style_context().remove_class("button_active") self.active_heater = None + for d in self.active_heaters: + self.devices[d]['name'].get_style_context().add_class("button_active") + if self._screen.vertical_mode: self.grid.remove_row(1) self.grid.attach(self.create_right_panel(), 0, 1, 1, 1) @@ -493,9 +496,8 @@ class TemperaturePanel(ScreenPanel): return def show_numpad(self, widget, device=None): - - if self.active_heater is not None: - self.devices[self.active_heater]['name'].get_style_context().remove_class("button_active") + for d in self.active_heaters: + self.devices[d]['name'].get_style_context().remove_class("button_active") self.active_heater = self.popover_device if device is None else device self.devices[self.active_heater]['name'].get_style_context().add_class("button_active")