Skip to content

Commit 8dea8c5

Browse files
committed
fix upd mode not save status bug
1 parent 405b278 commit 8dea8c5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

COMTool/conn/conn_tcp_udp.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def onWidget(self):
150150
self.serialSettingsLayout.addWidget(self.autoReconnectIntervalEdit, 5, 2, 1, 1)
151151
self.serialSettingsLayout.addWidget(self.serialOpenCloseButton, 6, 0, 1, 3)
152152
serialSetting.setLayout(self.serialSettingsLayout)
153-
self.widgetConfMap["protocol"] = self.protoclTcpRadioBtn
153+
self.widgetConfMap["protocol"] = [self.protoclTcpRadioBtn, self.protoclUdpRadioBtn]
154154
self.widgetConfMap["mode"] = self.modeClientRadioBtn
155155
self.widgetConfMap["target"] = self.targetCombobox
156156
self.widgetConfMap["port"] = self.porttEdit
@@ -288,9 +288,11 @@ def onSerialConfigChanged(self, conf_type, obj, value_type, caller=""):
288288
def setSerialConfig(self, conf_type, obj, value):
289289
if conf_type == "protocol":
290290
if value == "tcp":
291-
obj.setChecked(True)
291+
obj[0].setChecked(True)
292+
obj[1].setChecked(False)
292293
else:
293-
obj.setChecked(False)
294+
obj[0].setChecked(False)
295+
obj[1].setChecked(True)
294296
elif conf_type == "mode":
295297
if value == "client":
296298
obj.setChecked(True)

0 commit comments

Comments
 (0)