1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-10 22:31:40 +02:00

Correctly block mod enable button for mods with missing dependencies

This commit is contained in:
Ivan Savenko
2024-12-10 13:37:36 +00:00
parent b0d8068493
commit bcada0eeed

View File

@@ -546,9 +546,6 @@ QStringList CModListView::getModsToInstall(QString mod)
candidates.pop_back();
processed.push_back(potentialToInstall);
if (modStateModel->isModExists(potentialToInstall) && modStateModel->isModInstalled(potentialToInstall))
continue;
if (modStateModel->isSubmod(potentialToInstall))
{
QString topParent = modStateModel->getTopParent(potentialToInstall);
@@ -562,7 +559,8 @@ QStringList CModListView::getModsToInstall(QString mod)
potentialToInstall = modStateModel->getTopParent(potentialToInstall);
}
result.push_back(potentialToInstall);
if (modStateModel->isModExists(potentialToInstall) && !modStateModel->isModInstalled(potentialToInstall))
result.push_back(potentialToInstall);
if (modStateModel->isModExists(potentialToInstall))
{