summaryrefslogtreecommitdiff
path: root/src/profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profile.cpp')
-rw-r--r--src/profile.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/profile.cpp b/src/profile.cpp
index 6b8d0709..66c23ea1 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -602,11 +602,15 @@ void Profile::setModEnabled(unsigned int index, bool enabled)
}
ModInfo::Ptr modInfo = ModInfo::getByIndex(index);
+
// we could quit in the following case, this shouldn't be a change anyway,
// but at least this allows the situation to be fixed in case of an error
if (modInfo->alwaysEnabled()) {
enabled = true;
}
+ if (modInfo->alwaysDisabled()) {
+ enabled = false;
+ }
if (enabled != m_ModStatus[index].m_Enabled) {
m_ModStatus[index].m_Enabled = enabled;
@@ -614,7 +618,7 @@ void Profile::setModEnabled(unsigned int index, bool enabled)
}
}
-void Profile::setModsEnabled(const QList<unsigned int> &modsToEnable, const QList<unsigned int> &modsToDisable)
+void Profile::setModsEnabled(const QList<unsigned int>& modsToEnable, const QList<unsigned int>& modsToDisable)
{
QList<unsigned int> dirtyMods;
for (auto idx : modsToEnable) {
@@ -622,6 +626,9 @@ void Profile::setModsEnabled(const QList<unsigned int> &modsToEnable, const QLis
log::error("invalid mod index: {}", idx);
continue;
}
+ if (ModInfo::getByIndex(idx)->alwaysDisabled()) {
+ continue;
+ }
if (!m_ModStatus[idx].m_Enabled) {
m_ModStatus[idx].m_Enabled = true;
dirtyMods.append(idx);