diff --git a/crates/engine/src/devinspect.rs b/crates/engine/src/devinspect.rs index 16f4bbdc..8d9b1e2e 100644 --- a/crates/engine/src/devinspect.rs +++ b/crates/engine/src/devinspect.rs @@ -224,9 +224,11 @@ pub struct DevItem { /// Revert to saved, which isn't an undo step but throws the design's unsaved edits away. pub fn dev_mode_allows(id: &str) -> bool { const OWN: [&str; 5] = ["annotation.", "dev.", "devResource.", "codeConnect.", "comment."]; + // Edits recorded as one grouped undo step, so their spec says no history of its own. + const GROUPED: [&str; 1] = ["data.fill"]; match id.strip_prefix("tool.") { Some(t) => matches!(t, "move" | "hand" | "comment"), - None if id == "file.revert" => false, + None if id == "file.revert" || GROUPED.contains(&id) => false, None => OWN.iter().any(|p| id.starts_with(p)) || crate::cmd::find_command(id).is_none_or(|c| !c.history), } } diff --git a/crates/engine/src/devmode_behaviour_tests.rs b/crates/engine/src/devmode_behaviour_tests.rs index 3d85fdb1..38d1a9fb 100644 --- a/crates/engine/src/devmode_behaviour_tests.rs +++ b/crates/engine/src/devmode_behaviour_tests.rs @@ -124,6 +124,7 @@ fn dev_mode_runs_its_own_edits_and_refuses_design_edits_from_menus_and_shortcuts "tool.place", "file.import", "file.revert", + "data.fill", ] { assert!(!dev_mode_allows(id), "{id} edits the design"); }