summaryrefslogtreecommitdiff
path: root/src/organizercore.cpp
diff options
context:
space:
mode:
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..45fe5220 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 = contentFeature->getAllContents();
+ }
+ else {
+ m_Contents = {};
+ }
+ });
+
connect(&m_PluginList, &PluginList::writePluginsList, &m_PluginListsWriter,
&DelayedFileWriterBase::write);