diff options
| author | Tannin <devnull@localhost> | 2015-03-09 12:17:57 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-03-09 12:17:57 +0100 |
| commit | 026b97835e6f3a4ab0f0e760318c1c36257feb60 (patch) | |
| tree | 4188effa30297b65390c271c0c59c10013010805 /src | |
| parent | d08e0ebab09b0a71c3042cd20b8994ec1c10a525 (diff) | |
- when activating/deactivating a mod the contained esps are only activated/deactivated if no other
active mod provides the same plugins
Diffstat (limited to 'src')
| -rw-r--r-- | src/organizercore.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 6a5e08d0..c2eaeae7 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1138,13 +1138,16 @@ void OrganizerCore::updateModActiveState(int index, bool active) {
ModInfo::Ptr modInfo = ModInfo::getByIndex(index);
QDir dir(modInfo->absolutePath());
- foreach (const QString &esm, dir.entryList(QStringList("*.esm"), QDir::Files)) {
+ foreach (const QString &esm, dir.entryList(QStringList() << "*.esm", QDir::Files)) {
m_PluginList.enableESP(esm, active);
}
int enabled = 0;
- QStringList esps = dir.entryList(QStringList("*.esp"), QDir::Files);
- foreach (const QString &esp, esps) {
- if (active != m_PluginList.isEnabled(esp)) {
+ QStringList esps = dir.entryList(QStringList() << "*.esp", QDir::Files);
+ for (const QString &esp : esps) {
+ const FileEntry::Ptr file = m_DirectoryStructure->findFile(ToWString(esp));
+
+ if (active != m_PluginList.isEnabled(esp)
+ && file->getAlternatives().empty()) {
m_PluginList.enableESP(esp, active);
++enabled;
}
@@ -1392,10 +1395,8 @@ void OrganizerCore::syncOverwrite() modInfo->testValid();
refreshDirectoryStructure();
}
-
}
-
std::vector<unsigned int> OrganizerCore::activeProblems() const
{
std::vector<unsigned int> problems;
|
