FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust
effect controls: a handle's parameters stay one undo step; tests twirl the effect open
ReReddo1f56c1415291
diff --git a/crates/ui-egui/src/panels/effect_controls.rs b/crates/ui-egui/src/panels/effect_controls.rsindex 8fe8f21d0..d453e8e26 100644--- a/crates/ui-egui/src/panels/effect_controls.rs+++ b/crates/ui-egui/src/panels/effect_controls.rs@@ -1006,7 +1006,9 @@ pub(crate) fn run(app: &mut FilmcraftApp, ctx: &egui::Context, actions: Vec<(Strif p.get("merge").is_none() {p["merge"] = json!(true);}- p["begin"] = json!(begun != press);+ // only the first write of a frame begins the step: a handle that changes several+ // parameters at once (position and anchor point) sends them together+ p["begin"] = json!(begun != press && !wrote);wrote = true;}if let Err(e) = app.session.execute(&cmd, p) {diff --git a/crates/ui-egui/tests/keyframes_ui.rs b/crates/ui-egui/tests/keyframes_ui.rsindex bf29cb62d..a9681d05b 100644--- a/crates/ui-egui/tests/keyframes_ui.rs+++ b/crates/ui-egui/tests/keyframes_ui.rs@@ -339,7 +339,7 @@ fn graph_keyframes_offer_interpolation_and_clear_in_one_undo_step() {if effect == "transform" {d.exec("effects.apply", json!({"clips": [clip.id], "effect": effect}));for intrinsic in ["motion", "opacity", "time_remap"] {- d.click(&format!("effectControls.effect.{intrinsic}"));+ d.click(&format!("effectControls.effect.{intrinsic}.twirl"));}}for (seconds, value) in [0.5, 2.5].into_iter().zip(values) {@@ -395,7 +395,7 @@ fn mask_keyframe_menus_preserve_the_effect_and_other_masks() {let (mut d, clip) = Driver::demo();d.ok("ui.set", json!({"workspace": "Effects"}));for intrinsic in ["motion", "time_remap"] {- d.click(&format!("effectControls.effect.{intrinsic}"));+ d.click(&format!("effectControls.effect.{intrinsic}.twirl"));}for mask in 0..2 {d.exec("masks.add", json!({"clip": clip.id, "effect": "opacity", "shape": "ellipse"}));