diff options
| author | Tannin <devnull@localhost> | 2014-06-16 21:49:57 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-06-16 21:49:57 +0200 |
| commit | 484749e612489336e5bfbe50ddc3cbe307069d4c (patch) | |
| tree | 296dc49d05a82c4b331f734ef1caa906a0dc5162 /src/pluginlist.cpp | |
| parent | 6d3f88b330f680459146ff1304c4752ffdbd1263 (diff) | |
- added pseudo-categories to filter for mo-managed vs. unmanaged mods
- deleted mods are now moved to the recycle bin instead of being deleted permanently
- reduced modinfo dialog for foreign mods
- foreign mods are now displayed with a pseudo-category
- added a signal when a plugin is moved
- bugfix: refreshing of directory structure for mods with bsas didn't work correctly when enabling a mod and on changing display of foreign mods
- bugfix: one mod in the list was assigned the same priority on the directory structure as the data directory
- bugfix: conflicts tab in the mod info dialog offered the hide option for files in bsas
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 79df08ae..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(); @@ -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)); } |
