From ac1a8e957ae6af50eca3daeb1fd9a2dc5682ec0f Mon Sep 17 00:00:00 2001 From: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com> Date: Mon, 29 Aug 2022 20:37:55 +0200 Subject: [PATCH] fix(effects): Fix parameters of effect not showing up when not in default settings file fixes mixxxdj/mixxx/issues/10834 --- src/effects/presets/effectpresetmanager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/effects/presets/effectpresetmanager.cpp b/src/effects/presets/effectpresetmanager.cpp index d266608e3f3..06101ca4b4a 100644 --- a/src/effects/presets/effectpresetmanager.cpp +++ b/src/effects/presets/effectpresetmanager.cpp @@ -39,11 +39,13 @@ void EffectPresetManager::loadDefaultEffectPresets() { file.close(); continue; } - EffectPresetPointer pEffectPreset(new EffectPreset(doc.documentElement())); - if (!pEffectPreset->isEmpty()) { + auto presetFromFile = EffectPreset(doc.documentElement()); + if (!presetFromFile.isEmpty()) { EffectManifestPointer pManifest = m_pBackendManager->getManifest( - pEffectPreset->id(), pEffectPreset->backendType()); + presetFromFile.id(), presetFromFile.backendType()); if (pManifest) { + auto pEffectPreset = EffectPresetPointer(new EffectPreset(pManifest)); + pEffectPreset->updateParametersFrom(presetFromFile); m_defaultPresets.insert(pManifest, pEffectPreset); } }