1
0
Files
electrum/electrum/gui/qml/components/ServerConnectWizard.qml
Sander van Grieken 7df2a1159b qml: fix updating network settings
Previously the server parameters were each handled differently, e.g. auto-connect was only applied when updating Network.server
and not when Config.autoConnect was updated. Similarly, updating Network.server did not restart the network, leading to >1 connection
when Network.oneServer was set to True before updating Network.server.

Consolidate server parameter updates into a single call, remove the individual setters, and move Config.autoConnect and Config.autoConnectDefined to Network.
2025-06-03 13:22:45 +02:00

32 lines
721 B
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import "wizard"
Wizard {
id: serverconnectwizard
wizardTitle: qsTr('Network configuration')
enter: null // disable transition
wiz: Daemon.serverConnectWizard
finishButtonText: qsTr('Next')
onAccepted: {
var proxy = wizard_data['proxy']
if (proxy && proxy['enabled'] == true) {
Network.proxy = proxy
} else {
Network.proxy = {'enabled': false}
}
Network.setServerParameters(wizard_data['server'], wizard_data['autoconnect'], wizard_data['one_server'])
}
Component.onCompleted: {
var view = wiz.startWizard()
_loadNextComponent(view)
}
}