fixed reset api button for non-default server
This commit is contained in:
parent
151e662027
commit
f372f4074b
3 changed files with 5 additions and 5 deletions
|
@ -564,9 +564,9 @@ void InstallController::removeProcessedContainer()
|
||||||
emit installationErrorOccurred(errorString(errorCode));
|
emit installationErrorOccurred(errorString(errorCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstallController::removeApiConfig()
|
void InstallController::removeApiConfig(const int serverIndex)
|
||||||
{
|
{
|
||||||
auto serverConfig = m_serversModel->getServerConfig(m_serversModel->getDefaultServerIndex());
|
auto serverConfig = m_serversModel->getServerConfig(serverIndex);
|
||||||
|
|
||||||
#ifdef Q_OS_IOS
|
#ifdef Q_OS_IOS
|
||||||
QString vpncName = QString("%1 (%2) %3")
|
QString vpncName = QString("%1 (%2) %3")
|
||||||
|
@ -584,7 +584,7 @@ void InstallController::removeApiConfig()
|
||||||
|
|
||||||
serverConfig.insert(config_key::defaultContainer, ContainerProps::containerToString(DockerContainer::None));
|
serverConfig.insert(config_key::defaultContainer, ContainerProps::containerToString(DockerContainer::None));
|
||||||
|
|
||||||
m_serversModel->editServer(serverConfig, m_serversModel->getDefaultServerIndex());
|
m_serversModel->editServer(serverConfig, serverIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstallController::clearCachedProfile()
|
void InstallController::clearCachedProfile()
|
||||||
|
|
|
@ -35,7 +35,7 @@ public slots:
|
||||||
void removeAllContainers();
|
void removeAllContainers();
|
||||||
void removeProcessedContainer();
|
void removeProcessedContainer();
|
||||||
|
|
||||||
void removeApiConfig();
|
void removeApiConfig(const int serverIndex);
|
||||||
|
|
||||||
void clearCachedProfile();
|
void clearCachedProfile();
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ PageType {
|
||||||
PageController.showNotificationMessage(qsTr("Cannot reset API config during active connection"))
|
PageController.showNotificationMessage(qsTr("Cannot reset API config during active connection"))
|
||||||
} else {
|
} else {
|
||||||
PageController.showBusyIndicator(true)
|
PageController.showBusyIndicator(true)
|
||||||
InstallController.removeApiConfig()
|
InstallController.removeApiConfig(ServersModel.processedIndex)
|
||||||
PageController.showBusyIndicator(false)
|
PageController.showBusyIndicator(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue