|
|
@@ -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();
|
|
|
|