summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Rimpo <jeremy.rimpo@servermonkey.com>2017-12-02 13:38:26 -0600
committerGitHub <noreply@github.com>2017-12-02 13:38:26 -0600
commitffdc5ca7ccb24bc937ed5418b7a6e5a1b7d719dd (patch)
tree66f9ecd51775c9e184b1679fc2d6fecc74fb1d8a /src
parentc55a923bb8b9b66661f32beed8445602400ef318 (diff)
parente19597ee4e8d045d61bd6c4a85e280e500475ed6 (diff)
Merge pull request #133 from Silarn/mainline_dev
Final highlighting changes
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp2
-rw-r--r--src/pluginlist.cpp4
-rw-r--r--src/pluginlist.h3
3 files changed, 5 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 84860767..cdc32918 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -2126,7 +2126,7 @@ void MainWindow::modlistSelectionChanged(const QModelIndex &current, const QMode
void MainWindow::modlistSelectionsChanged(const QItemSelection &selected)
{
- m_OrganizerCore.pluginList()->highlightPlugins(selected, *m_OrganizerCore.directoryStructure());
+ m_OrganizerCore.pluginList()->highlightPlugins(selected, *m_OrganizerCore.directoryStructure(), *m_OrganizerCore.currentProfile());
ui->espList->verticalScrollBar()->repaint();
}
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index add34b3f..61d33fe9 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -108,14 +108,14 @@ QString PluginList::getColumnToolTip(int column)
}
}
-void PluginList::highlightPlugins(const QItemSelection &selected, const MOShared::DirectoryEntry &directoryEntry)
+void PluginList::highlightPlugins(const QItemSelection &selected, const MOShared::DirectoryEntry &directoryEntry, const Profile &profile)
{
for (auto &esp : m_ESPs) {
esp.m_ModSelected = false;
}
for (QModelIndex idx : selected.indexes()) {
ModInfo::Ptr selectedMod = ModInfo::getByIndex(idx.data(Qt::UserRole + 1).toInt());
- if (!selectedMod.isNull()) {
+ if (!selectedMod.isNull() && profile.modEnabled(idx.data(Qt::UserRole + 1).toInt())) {
QDir dir(selectedMod->absolutePath());
QStringList plugins = dir.entryList(QStringList() << "*.esp" << "*.esm" << "*.esl");
MOShared::FilesOrigin origin = directoryEntry.getOriginByName(selectedMod->internalName().toStdWString());
diff --git a/src/pluginlist.h b/src/pluginlist.h
index 19e98989..8d1a5491 100644
--- a/src/pluginlist.h
+++ b/src/pluginlist.h
@@ -22,6 +22,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <directoryentry.h>
#include <ipluginlist.h>
+#include "profile.h"
namespace MOBase { class IPluginGame; }
#include <QString>
@@ -200,7 +201,7 @@ public:
static QString getColumnName(int column);
static QString getColumnToolTip(int column);
- void highlightPlugins(const QItemSelection &selected, const MOShared::DirectoryEntry &directoryEntry);
+ void highlightPlugins(const QItemSelection &selected, const MOShared::DirectoryEntry &directoryEntry, const Profile &profile);
void refreshLoadOrder();