From eda8931719dde558bed10f4010fb3e5b2c67ec71 Mon Sep 17 00:00:00 2001 From: jatin Date: Mon, 29 Jan 2024 19:43:34 -0800 Subject: [PATCH] CLAP preset loaded bug fix --- .../Backend/chowdsp_PresetManager.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetManager.cpp b/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetManager.cpp index 05152588b..5917bfa79 100644 --- a/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetManager.cpp +++ b/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetManager.cpp @@ -139,12 +139,17 @@ void PresetManager::loadPreset (const Preset& preset) #if HAS_CLAP_JUCE_EXTENSIONS if (preset.getPresetFile() == juce::File {}) + { clapPresetLoadedBroadcaster (CLAP_PRESET_DISCOVERY_LOCATION_PLUGIN, nullptr, preset.getName().toRawUTF8()); - clapPresetLoadedBroadcaster (CLAP_PRESET_DISCOVERY_LOCATION_FILE, - preset.getPresetFile().getFullPathName().toRawUTF8(), - nullptr); + } + else + { + clapPresetLoadedBroadcaster (CLAP_PRESET_DISCOVERY_LOCATION_FILE, + preset.getPresetFile().getFullPathName().toRawUTF8(), + nullptr); + } #endif }