From 800c2ea084235a09e3f55e38c768b14da40099b3 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Fri, 15 Sep 2023 21:30:07 -0500 Subject: [PATCH] Context menu fix Prevent changing the status of force disabled or enabled plugins via the context menu --- src/pluginlist.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index cb3face65..a50f242c2 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);