fixup! Refactor repeated stuff

This commit is contained in:
atse 2024-08-28 10:55:58 +08:00
parent 863106d835
commit db127f788b

View File

@ -139,10 +139,10 @@ class MainWindow(QtWidgets.QMainWindow):
state == ThermostatConnectionState.CONNECTED
)
self.conn_menu.host_set_line.setEnabled(
state != ThermostatConnectionState.DISCONNECTED
state == ThermostatConnectionState.DISCONNECTED
)
self.conn_menu.port_set_spin.setEnabled(
state != ThermostatConnectionState.DISCONNECTED
state == ThermostatConnectionState.DISCONNECTED
)
match state: