mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-11 04:40:20 -06:00
Count tracks, not lanes, in track.clear_trim_automation's result
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
93ddd419f5
commit
165fa98a90
@@ -455,7 +455,9 @@ pub(super) fn clear_trim(e: &mut Engine, p: &Value) -> Result<Value> {
|
||||
let Some(tr) = s.track_mut(*t) else { continue };
|
||||
let before = tr.automation.len();
|
||||
tr.automation.retain(|l| l.param != trim_param());
|
||||
n += before - tr.automation.len();
|
||||
if tr.automation.len() < before {
|
||||
n += 1;
|
||||
}
|
||||
}
|
||||
Ok(json!({"tracks": n}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user