[Backport release-10.x] Fixed dependencies not enabling/disabling other dependencies (#5724)
Some checks failed
Nix / Build (aarch64-darwin) (push) Has been cancelled
Nix / Build (x86_64-linux) (push) Has been cancelled
Nix / Build (aarch64-linux) (push) Has been cancelled

This commit is contained in:
Alexandru Ionut Tripon 2026-06-25 13:32:25 +03:00 committed by GitHub
commit ed239ac6eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -255,7 +255,6 @@ void ModFolderModel::onParseSucceeded(int ticket, QString mod_id)
if (result && resource) {
auto* mod = static_cast<Mod*>(resource.get());
mod->finishResolvingWithDetails(std::move(result->details));
}
emit dataChanged(index(row, RequiresColumn), index(row, RequiredByColumn));
}
@ -319,15 +318,14 @@ QSet<Mod*> collectMods(QSet<Mod*> mods, QHash<QString, QSet<Mod*>> relation, std
{
QSet<Mod*> affectedList = {};
QSet<Mod*> needToCheck = {};
for (auto mod : mods) {
for (auto* mod : mods) {
auto id = mod->mod_id();
if (seen.count(id) == 0) {
if (!seen.contains(id)) {
seen.insert(id);
for (auto affected : relation[id]) {
for (auto* affected : relation[id]) {
auto affectedId = affected->mod_id();
if (findById(mods, affectedId) == nullptr && seen.count(affectedId) == 0) {
seen.insert(affectedId);
if (findById(mods, affectedId) == nullptr && !seen.contains(affectedId)) {
if (shouldBeEnabled != affected->enabled()) {
affectedList << affected;
}