MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / modPrioritiesChanged

Method modPrioritiesChanged

src/organizercore.cpp:1649–1672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1647}
1648
1649void OrganizerCore::modPrioritiesChanged(const QModelIndexList& indices)
1650{
1651 for (unsigned int i = 0; i < currentProfile()->numMods(); ++i) {
1652 int priority = currentProfile()->getModPriority(i);
1653 if (currentProfile()->modEnabled(i)) {
1654 ModInfo::Ptr modInfo = ModInfo::getByIndex(i);
1655 // priorities in the directory structure are one higher because data is 0
1656 directoryStructure()
1657 ->getOriginByName(MOBase::ToWString(modInfo->internalName()))
1658 .setPriority(priority + 1);
1659 }
1660 }
1661 refreshBSAList();
1662 currentProfile()->writeModlist();
1663 directoryStructure()->getFileRegister()->sortOrigins();
1664
1665 std::vector<unsigned int> vindices;
1666
1667 for (auto& idx : indices) {
1668 vindices.push_back(idx.data(ModList::IndexRole).toInt());
1669 }
1670
1671 clearCaches(vindices);
1672}
1673
1674void OrganizerCore::modStatusChanged(unsigned int index)
1675{

Callers

nothing calls this directly

Calls 10

ToWStringFunction · 0.85
numModsMethod · 0.80
getModPriorityMethod · 0.80
modEnabledMethod · 0.80
writeModlistMethod · 0.80
getFileRegisterMethod · 0.80
setPriorityMethod · 0.45
internalNameMethod · 0.45
sortOriginsMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected