Skip to content

Commit

Permalink
Context menu fix
Browse files Browse the repository at this point in the history
Prevent changing the status of force disabled or enabled plugins via the context menu
  • Loading branch information
Silarn committed Sep 16, 2023
1 parent d15a87b commit 800c2ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pluginlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 800c2ea

Please sign in to comment.