From d9e943a88df1ab8f1fcb64c9430da0b44d674e67 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 16 Mar 2022 22:00:31 +0100 Subject: [PATCH] Filter out the root group --- src/wrapper/vst3/param_units.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wrapper/vst3/param_units.rs b/src/wrapper/vst3/param_units.rs index 99796239..38564190 100644 --- a/src/wrapper/vst3/param_units.rs +++ b/src/wrapper/vst3/param_units.rs @@ -54,7 +54,14 @@ impl ParamUnits { let unique_group_names: HashSet<&str> = groups .clone() .into_iter() - .map(|(_, group_name)| group_name) + .filter_map(|(_, group_name)| { + // The root should not be included here since that's a special case in VST3 + if !group_name.is_empty() { + Some(group_name) + } else { + None + } + }) .collect(); let mut groups_units: Vec<(&str, ParamUnit)> = unique_group_names .into_iter()