1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00

Fix not functioning mod updating

This commit is contained in:
Ivan Savenko 2024-12-04 11:15:39 +00:00
parent 9e07b5c5de
commit cdc1a9ea68

View File

@ -597,6 +597,10 @@ QStringList CModListView::getModsToInstall(QString mod)
void CModListView::on_updateButton_clicked()
{
QString modName = ui->allModsView->currentIndex().data(ModRoles::ModNameRole).toString();
auto targetMod = modStateModel->getMod(modName);
if(targetMod.isUpdateAvailable())
downloadFile(modName + ".zip", targetMod.getDownloadUrl(), modName, targetMod.getDownloadSizeBytes());
for(const auto & name : getModsToInstall(modName))
{