temperature: merge nested ifs
This commit is contained in:
parent
723662074e
commit
e208873e46
@ -211,8 +211,7 @@ class TemperaturePanel(ScreenPanel):
|
|||||||
self.hide_numpad()
|
self.hide_numpad()
|
||||||
|
|
||||||
def select_heater(self, widget, device):
|
def select_heater(self, widget, device):
|
||||||
if self.active_heater is None:
|
if self.active_heater is None and self.devices[device]["can_target"]:
|
||||||
if self.devices[device]["can_target"]:
|
|
||||||
if device in self.active_heaters:
|
if device in self.active_heaters:
|
||||||
self.active_heaters.pop(self.active_heaters.index(device))
|
self.active_heaters.pop(self.active_heaters.index(device))
|
||||||
self.devices[device]['name'].get_style_context().remove_class("button_active")
|
self.devices[device]['name'].get_style_context().remove_class("button_active")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user