Change statement order up a bit

This commit is contained in:
atse 2023-07-14 16:16:52 +08:00
parent 27ce311111
commit e727f8b06b

View File

@ -167,9 +167,9 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
try:
if not (self.tec_client.is_connecting() or self.tec_client.is_connected()):
self.status_lbl.setText("Connecting...")
self.connect_btn.setText("Stop")
self.ip_set_line.setEnabled(False)
self.port_set_spin.setEnabled(False)
self.connect_btn.setText("Stop")
try:
await self.tec_client.connect(host=ip, port=port, timeout=30)