diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index d3675c8..257d375 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -216,11 +216,11 @@ 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. - self._t_line.label.setText(f"{temp} °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") class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):