1
0
Fork 0

Filter out the root group

This commit is contained in:
Robbert van der Helm 2022-03-16 22:00:31 +01:00
parent 8d6a7ae861
commit d9e943a88d

View file

@ -54,7 +54,14 @@ impl ParamUnits {
let unique_group_names: HashSet<&str> = groups let unique_group_names: HashSet<&str> = groups
.clone() .clone()
.into_iter() .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(); .collect();
let mut groups_units: Vec<(&str, ParamUnit)> = unique_group_names let mut groups_units: Vec<(&str, ParamUnit)> = unique_group_names
.into_iter() .into_iter()