fixed first container selection on HomeContainersListView after server cleanup

This commit is contained in:
vladimir.kuznetsov 2024-01-23 23:56:16 +07:00
parent 73cfab166f
commit f55bd5e1a1

View file

@ -30,7 +30,9 @@ ListView {
target: ServersModel target: ServersModel
function onCurrentlyProcessedServerIndexChanged() { function onCurrentlyProcessedServerIndexChanged() {
menuContent.checkCurrentItem() if (ContainersModel.getDefaultContainer()) {
menuContent.checkCurrentItem()
}
} }
} }
@ -76,9 +78,8 @@ ListView {
} }
if (checked) { if (checked) {
ServersModel.setDefaultContainer(proxyContainersModel.mapToSource(index))
containersDropDown.menuVisible = false containersDropDown.menuVisible = false
ServersModel.setDefaultContainer(proxyContainersModel.mapToSource(index))
} else { } else {
if (!isSupported && isInstalled) { if (!isSupported && isInstalled) {
PageController.showErrorMessage(qsTr("The selected protocol is not supported on the current platform")) PageController.showErrorMessage(qsTr("The selected protocol is not supported on the current platform"))