summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modlist.cpp')
-rw-r--r--src/modlist.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp
index de24fbbd..48f65d3a 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -549,7 +549,6 @@ bool ModList::setData(const QModelIndex &index, const QVariant &value, int role)
m_Profile->setModEnabled(modID, enabled);
m_Modified = true;
m_LastCheck.restart();
- emit modStatesChanged({ index });
emit tutorialModlistUpdate();
}
result = true;
@@ -997,11 +996,15 @@ void ModList::notifyModRemoved(QString const& modName) const
void ModList::notifyModStateChanged(QList<unsigned int> modIndices) const
{
+ QModelIndexList indices;
std::map<QString, IModList::ModStates> mods;
for (auto modIndex : modIndices) {
+ indices.append(index(modIndex, 0));
ModInfo::Ptr modInfo = ModInfo::getByIndex(modIndex);
mods.emplace(modInfo->name(), state(modIndex));
}
+
+ emit modStatesChanged(indices);
m_ModStateChanged(mods);
}
@@ -1404,7 +1407,6 @@ bool ModList::toggleState(const QModelIndexList& indices)
m_Profile->setModsEnabled(modsToEnable, modsToDisable);
- emit modStatesChanged(indices);
emit tutorialModlistUpdate();
m_Modified = true;
@@ -1430,6 +1432,4 @@ void ModList::setActive(const QModelIndexList& indices, bool active)
else {
m_Profile->setModsEnabled({}, mods);
}
-
- emit modStatesChanged(indices);
}