summaryrefslogtreecommitdiff
path: root/src/modlistview.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-21 21:56:26 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-21 21:56:26 +0100
commitd94b7c444d02e070875026d8c037fbd9700d2ca8 (patch)
treec7d9c5a101c16aacf4e635a4e7e301d4206ebd30 /src/modlistview.cpp
parentb1795f83cd500b5b58928efa5e170de8338178d5 (diff)
Move update of directory structure after mod priority change to organizer core.
Diffstat (limited to 'src/modlistview.cpp')
-rw-r--r--src/modlistview.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/modlistview.cpp b/src/modlistview.cpp
index aa920905..a6bb4982 100644
--- a/src/modlistview.cpp
+++ b/src/modlistview.cpp
@@ -434,42 +434,6 @@ void ModListView::onModPrioritiesChanged(const QModelIndexList& indices)
}
}
- for (unsigned int i = 0; i < m_core->currentProfile()->numMods(); ++i) {
- int priority = m_core->currentProfile()->getModPriority(i);
- if (m_core->currentProfile()->modEnabled(i)) {
- ModInfo::Ptr modInfo = ModInfo::getByIndex(i);
- // priorities in the directory structure are one higher because data is 0
- m_core->directoryStructure()->getOriginByName(MOBase::ToWString(modInfo->internalName())).setPriority(priority + 1);
- }
- }
- m_core->refreshBSAList();
- m_core->currentProfile()->writeModlist();
- m_core->directoryStructure()->getFileRegister()->sortOrigins();
-
- for (auto& idx : indices) {
- ModInfo::Ptr modInfo = ModInfo::getByIndex(idx.data(ModList::IndexRole).toInt());
- // clear caches on all mods conflicting with the moved mod
- for (int i : modInfo->getModOverwrite()) {
- ModInfo::getByIndex(i)->clearCaches();
- }
- for (int i : modInfo->getModOverwritten()) {
- ModInfo::getByIndex(i)->clearCaches();
- }
- for (int i : modInfo->getModArchiveOverwrite()) {
- ModInfo::getByIndex(i)->clearCaches();
- }
- for (int i : modInfo->getModArchiveOverwritten()) {
- ModInfo::getByIndex(i)->clearCaches();
- }
- for (int i : modInfo->getModArchiveLooseOverwrite()) {
- ModInfo::getByIndex(i)->clearCaches();
- }
- for (int i : modInfo->getModArchiveLooseOverwritten()) {
- ModInfo::getByIndex(i)->clearCaches();
- }
- // update conflict check on the moved mod
- modInfo->doConflictCheck();
- }
setOverwriteMarkers(selectionModel()->selectedRows());
}