mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-06 18:34:31 +00:00
Make Clear All Clip Indicators clear them
Track > Clear All Clip Indicators (Alt+C) was a stub: the red clip indicators on the meters stayed lit until another session was opened. The command now clears them on every track's meter and the main meter.
This commit is contained in:
1 parent
b2a3b0f861
commit
7208c610cd
1 file changed
+13
@@ -329,6 +329,9 @@ impl SoundApp {
|
||||
// Re-selecting a scrolling mode resumes the playhead follow.
|
||||
self.edit_layout.follow_hold = false;
|
||||
}
|
||||
if id == "track.clear_clip_indicators" {
|
||||
self.meters.values_mut().chain([&mut self.main_meter]).for_each(|m| m.clip = false);
|
||||
}
|
||||
Ok(v)
|
||||
}
|
||||
Err(e) => {
|
||||
@@ -985,6 +988,16 @@ mod tests {
|
||||
assert!(!app.engine.is_dirty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn clear_all_clip_indicators_clears_every_meter() {
|
||||
let mut app = SoundApp::new(soundcraft_engine::demo::demo_engine(), None, Services::default());
|
||||
let kick = app.engine.session().track_by_name("Kick").unwrap().id;
|
||||
app.meters.entry(kick).or_default().clip = true;
|
||||
app.main_meter.clip = true;
|
||||
app.run("track.clear_clip_indicators", json!({})).unwrap();
|
||||
assert!(!app.meters[&kick].clip && !app.main_meter.clip);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn automation_first_pass_after_start_is_due_without_overflow() {
|
||||
// `last_write_at` starts (and resets) at `i64::MIN`: the previous
|
||||
|
||||
Reference in new issue
Block a user