diff options
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 0a28a45f..4f363900 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -216,12 +216,12 @@ void PluginList::refresh(const QString &profileName, const DirectoryEntry &baseD } -void PluginList::enableESP(const QString &name) +void PluginList::enableESP(const QString &name, bool enable) { std::map<QString, int>::iterator iter = m_ESPsByName.find(name.toLower()); if (iter != m_ESPsByName.end()) { - m_ESPs[iter->second].m_Enabled = true; + m_ESPs[iter->second].m_Enabled = enable; startSaveTime(); } else { reportError(tr("esp not found: %1").arg(name)); @@ -677,6 +677,14 @@ bool PluginList::onRefreshed(const std::function<void ()> &callback) return conn.connected(); } + +bool PluginList::onPluginMoved(const std::function<void (const QString &, int, int)> &func) +{ + auto conn = m_PluginMoved.connect(func); + return conn.connected(); +} + + void PluginList::updateIndices() { m_ESPsByName.clear(); @@ -814,8 +822,8 @@ QVariant PluginList::data(const QModelIndex &modelIndex, int role) const text += "<br>There is an ini file connected to this esp. Its settings will be added to your game settings, overwriting " "in case of conflicts."; } else if (m_ESPs[index].m_IsDummy) { - text += "<br>This file is a dummy! It exists only so the bsa with the same name gets loaded. With MO you don't need this: " - "If you enable the archive with the same name in the \"Archive\" tab you can disable this plugin."; + text += "<br>This file is a dummy! It exists only so the bsa with the same name gets loaded. If you let MO manage archives you " + "don't need this: Enable the archive with the same name in the \"Archive\" tab and disable this plugin."; } toolTip += text; } @@ -947,6 +955,7 @@ void PluginList::setPluginPriority(int row, int &newPriority) m_ESPs.at(row).m_Priority = newPriorityTemp; emit dataChanged(index(row, 0), index(row, columnCount())); + m_PluginMoved(m_ESPs[row].m_Name, oldPriority, newPriorityTemp); } catch (const std::out_of_range&) { reportError(tr("failed to restore load order for %1").arg(m_ESPs[row].m_Name)); } |
