forked from M-Labs/thermostat
Fix setpoint line label to not display old values
Setpoint line still displays 0 °C sometimes!
This commit is contained in:
parent
9797364043
commit
d4bf06e242
@ -216,10 +216,10 @@ class ChannelGraphs:
|
||||
self._t_line.setVisible(visible)
|
||||
if temp is not None:
|
||||
self._t_line.setValue(temp)
|
||||
if visible is False:
|
||||
# PyQtGraph does not update this text when the line
|
||||
# is not visible, but we need it so that the temperature
|
||||
# label doesn't display 0 °C despite not being at 0 °C.
|
||||
|
||||
# PyQtGraph normally does not update this text when the line
|
||||
# is not visible, so make sure that the temperature label
|
||||
# gets updated always, and doesn't stay at an old value.
|
||||
self._t_line.label.setText(f"{temp} °C")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user