diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2019-01-05 02:56:43 -0600 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2019-01-05 02:57:01 -0600 |
| commit | 14782a374c727c8fb2c6733ba0556fca9dc9eda6 (patch) | |
| tree | 66e91496f7ba1ccacae5632e7b3625629b85d2c6 /src/organizercore.cpp | |
| parent | 070a9a4d47f6978cf94d0652c7ecda55486ad93f (diff) | |
Improve performance by removing redundant actions when changing mod states
Diffstat (limited to 'src/organizercore.cpp')
| -rw-r--r-- | src/organizercore.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 884b699c..9ebe9f47 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1787,7 +1787,9 @@ void OrganizerCore::updateModActiveState(int index, bool active) if (active != m_PluginList.isEnabled(esm)
&& file->getAlternatives().empty()) {
+ m_PluginList.blockSignals(true);
m_PluginList.enableESP(esm, active);
+ m_PluginList.blockSignals(false);
}
}
int enabled = 0;
@@ -1801,7 +1803,9 @@ void OrganizerCore::updateModActiveState(int index, bool active) if (active != m_PluginList.isEnabled(esl)
&& file->getAlternatives().empty()) {
+ m_PluginList.blockSignals(true);
m_PluginList.enableESP(esl, active);
+ m_PluginList.blockSignals(false);
++enabled;
}
}
@@ -1815,7 +1819,9 @@ void OrganizerCore::updateModActiveState(int index, bool active) if (active != m_PluginList.isEnabled(esp)
&& file->getAlternatives().empty()) {
+ m_PluginList.blockSignals(true);
m_PluginList.enableESP(esp, active);
+ m_PluginList.blockSignals(false);
++enabled;
}
}
@@ -1842,7 +1848,9 @@ void OrganizerCore::updateModInDirectoryStructure(unsigned int index, refreshESPList(true);
// activate all esps of the specified mod so the bsas get activated along with
// it
+ m_PluginList.blockSignals(true);
updateModActiveState(index, true);
+ m_PluginList.blockSignals(false);
// now we need to refresh the bsa list and save it so there is no confusion
// about what archives are avaiable and active
refreshBSAList();
@@ -2005,7 +2013,6 @@ void OrganizerCore::modStatusChanged(unsigned int index) updateModInDirectoryStructure(index, modInfo);
} else {
updateModActiveState(index, false);
- refreshESPList(true);
if (m_DirectoryStructure->originExists(ToWString(modInfo->name()))) {
FilesOrigin &origin
= m_DirectoryStructure->getOriginByName(ToWString(modInfo->name()));
|
