diff --git a/launcher/modManager/cmodlistview_moc.cpp b/launcher/modManager/cmodlistview_moc.cpp index 44f9ffa58..64bc7b99f 100644 --- a/launcher/modManager/cmodlistview_moc.cpp +++ b/launcher/modManager/cmodlistview_moc.cpp @@ -144,6 +144,7 @@ CModListView::CModListView(QWidget * parent) ui->splitter->setStyleSheet("QSplitter::handle {background: palette('window');}"); + disableModInfo(); setupModModel(); setupFilterModel(); setupModsView(); @@ -151,6 +152,7 @@ CModListView::CModListView(QWidget * parent) ui->progressWidget->setVisible(false); dlManager = nullptr; + modModel->reloadRepositories(); if(settings["launcher"]["autoCheckRepositories"].Bool()) loadRepositories(); @@ -597,6 +599,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)) { @@ -928,7 +934,8 @@ void CModListView::installMods(QStringList archives) manager->installMod(modNames[i], archives[i]); } - manager->enableMods(modsToEnable); + if (!modsToEnable.empty()) + manager->enableMods(modsToEnable); checkManagerErrors();