summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-02-09 20:14:03 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-02-09 20:23:42 +0100
commit595f6eccf615c0cf70c8d32e3edb515578efddc9 (patch)
tree2f5ebc24ccfd4a8e59eea6b896559c757375e62a /src/modlist.cpp
parent7d36bc20d0a6c327079141149a7f138c0f7726ac (diff)
Better refresh of override markers and conflicts.
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);
}