diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2019-03-09 21:41:38 -0600 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2019-03-09 21:41:38 -0600 |
| commit | c49fce871ae4f428c0181b0ea7dd396c85c735d2 (patch) | |
| tree | e952c5bd403a7831fcfcd4fb5ae861000ae254e5 | |
| parent | e8e7f70dedd8808d44cc3156ec2687c83153f5e9 (diff) | |
Allow selecting overwrite to trigger selected plugin highlight
| -rw-r--r-- | src/pluginlist.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 554cdc36..ec9bdac3 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -127,11 +127,10 @@ void PluginList::highlightPlugins(const QItemSelectionModel *selection, const MO esp.m_ModSelected = false;
}
for (QModelIndex idx : selection->selectedRows(ModList::COL_PRIORITY)) {
- int modPriority = idx.data(Qt::UserRole).toInt();
- if (modPriority < 0 || modPriority == INT_MAX)
+ int modIndex = idx.data(Qt::UserRole + 1).toInt();
+ if (modIndex == UINT_MAX)
continue;
- int modIndex = profile.modIndexByPriority(modPriority);
ModInfo::Ptr selectedMod = ModInfo::getByIndex(modIndex);
if (!selectedMod.isNull() && profile.modEnabled(modIndex)) {
QDir dir(selectedMod->absolutePath());
|
