mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-07 02:41:57 +00: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:
1 parent
93ddd419f5
commit
165fa98a90
1 file changed
+3
-1
@@ -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