reconnect to server when changed the protocol and status is connected or connnecting
This commit is contained in:
parent
f11c65c393
commit
f81ee1b267
2 changed files with 15 additions and 1 deletions
|
|
@ -62,8 +62,22 @@ ListView {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
isDefault = true
|
isDefault = true
|
||||||
|
var needReconnected = false
|
||||||
|
if (menuContent.currentIndex !== index) {
|
||||||
|
needReconnected = true
|
||||||
|
}
|
||||||
|
|
||||||
menuContent.currentIndex = index
|
menuContent.currentIndex = index
|
||||||
containersDropDown.menuVisible = false
|
containersDropDown.menuVisible = false
|
||||||
|
|
||||||
|
|
||||||
|
if (needReconnected &&
|
||||||
|
(ConnectionController.isConnected || ConnectionController.isConnectionInProgress)) {
|
||||||
|
PageController.showNotificationMessage(qsTr("Reconnect via VPN Procotol: ") + name)
|
||||||
|
PageController.goToPageHome()
|
||||||
|
menu.visible = false
|
||||||
|
ConnectionController.openConnection()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index))
|
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index))
|
||||||
InstallController.setShouldCreateServer(false)
|
InstallController.setShouldCreateServer(false)
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ PageType {
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: updateContainersModelFilters()
|
Component.onCompleted: updateContainersModelFilters()
|
||||||
currentIndex: ContainersModel.getDefaultContainer()
|
currentIndex: ContainersModel.getDefaultContainer() - 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue