Merge PR #662: Fix multiple connections setup when autoconnect option is given

This commit is contained in:
Jenkins nymea 2021-08-30 22:30:38 +02:00
commit 064d627596
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ Drawer {
}
ProgressButton {
imageSource: "/ui/images/close.svg"
visible: topSectionLayout.configureConnections
visible: topSectionLayout.configureConnections && (autoConnectHost.length === 0 || index > 0)
longpressEnabled: false
onClicked: {
configuredHostsModel.removeHost(index)

View File

@ -129,7 +129,7 @@ Item {
return;
}
print("Warning: There is a last connected host but UUID is unknown to discovery...")
} else if (autoConnectHost.length > 0) {
} else if (autoConnectHost.length > 0 && index === 0) {
var host = nymeaDiscovery.nymeaHosts.createLanHost(Configuration.systemName, autoConnectHost);
engine.jsonRpcClient.connectToHost(host)
return;