mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-10 18:31:30 -06:00
Follow-up to #2169: keep layer.deleteAllMarkers layer-only
An empty layers list cleared the composition's markers too (CodeRabbit); the composition-marker menu uses comp.deleteAllMarkers instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
83b4e36e9b
commit
917f312bc2
@@ -208,16 +208,3 @@ fn comp_delete_all_markers_with_undo() {
|
||||
s.execute("edit.redo", json!({})).unwrap();
|
||||
assert!(s.active_comp().unwrap().markers.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn layer_delete_all_markers_without_selection_clears_comp_markers() {
|
||||
let (mut s, _) = setup();
|
||||
s.execute("comp.addMarker", json!({"time": 1.0, "comment": "m1"})).unwrap();
|
||||
s.execute("comp.addMarker", json!({"time": 2.0, "comment": "m2"})).unwrap();
|
||||
s.execute("edit.deselectAll", json!({})).unwrap();
|
||||
assert!(s.state.selected_layers.is_empty());
|
||||
s.execute("layer.deleteAllMarkers", json!({})).unwrap();
|
||||
assert!(s.active_comp().unwrap().markers.is_empty());
|
||||
s.execute("edit.undo", json!({})).unwrap();
|
||||
assert_eq!(s.active_comp().unwrap().markers.len(), 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user