summaryrefslogtreecommitdiff
path: root/src/organizercore.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-05-28 23:42:53 -0400
committerGitHub <noreply@github.com>2020-05-28 23:42:53 -0400
commitda35955d6c15c4abc83ae8c0a4ea8195c0c0ac85 (patch)
treebeab5513b64e93c32d50f628321654623b603129 /src/organizercore.cpp
parent652d3ab054cd2bd94fe88dc42aa39798fc3b2c4a (diff)
parent0a5790b333883c7c4ef07bb44f0a411ce8ba79b5 (diff)
Merge pull request #1092 from Holt59/mod-data-content
Use ModDataContent feature from GamePlugin
Diffstat (limited to 'src/organizercore.cpp')
-rw-r--r--src/organizercore.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 6e4b3fbf..14f85ac0 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -135,6 +135,16 @@ OrganizerCore::OrganizerCore(Settings &settings)
connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame const *)),
&m_PluginList, SLOT(managedGameChanged(MOBase::IPluginGame const *)));
+ connect(this, &OrganizerCore::managedGameChanged, [this](IPluginGame const* gamePlugin) {
+ ModDataContent* contentFeature = gamePlugin->feature<ModDataContent>();
+ if (contentFeature) {
+ m_Contents = ModDataContentHolder(contentFeature->getAllContents());
+ }
+ else {
+ m_Contents = ModDataContentHolder();
+ }
+ });
+
connect(&m_PluginList, &PluginList::writePluginsList, &m_PluginListsWriter,
&DelayedFileWriterBase::write);