diff options
| author | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2023-09-15 21:30:07 -0500 |
|---|---|---|
| committer | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2023-09-15 21:30:07 -0500 |
| commit | 800c2ea084235a09e3f55e38c768b14da40099b3 (patch) | |
| tree | d050dac9294c19eeadb9d7cec1967375f35ab52c /src/pluginlist.cpp | |
| parent | d15a87b0e646e2bffc0605ce8fdae4909e41995c (diff) | |
Context menu fix
Prevent changing the status of force disabled or enabled plugins via the context menu
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index cb3face6..a50f242c 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -421,6 +421,8 @@ void PluginList::setEnabled(const QModelIndexList& indices, bool enabled) { QStringList dirty; for (auto& idx : indices) { + if (m_ESPs[idx.row()].forceEnabled || m_ESPs[idx.row()].forceDisabled) + continue; if (m_ESPs[idx.row()].enabled != enabled) { m_ESPs[idx.row()].enabled = enabled; dirty.append(m_ESPs[idx.row()].name); @@ -437,6 +439,8 @@ void PluginList::setEnabledAll(bool enabled) { QStringList dirty; for (ESPInfo& info : m_ESPs) { + if (info.forceEnabled || info.forceDisabled) + continue; if (info.enabled != enabled) { info.enabled = enabled; dirty.append(info.name); |
