diff --git a/crates/engine/src/cmd/conceptvector.rs b/crates/engine/src/cmd/conceptvector.rs index 7977ee8253..10180b3fdd 100644 --- a/crates/engine/src/cmd/conceptvector.rs +++ b/crates/engine/src/cmd/conceptvector.rs @@ -164,11 +164,12 @@ fn shown_image_node(n: &Node) -> Option<&Node> { } /// Is `n` a group whose members are made or placed from data it holds (a graph, an Objects on -/// Path, Shaper, dimension, flare or Live Paint group, a compound shape), so that a member added -/// to it would be placed again, replaced or combined with the others? +/// Path, Shaper, dimension, flare or Live Paint group, a compound shape, a plug-in's generated +/// art), so that a member added to it would be placed again, replaced or combined with the others? fn generated(n: &Node) -> bool { let e = n.extras(); - e.graph.is_some() + e.generated.is_some() + || e.graph.is_some() || e.objects_on_path.is_some() || e.shaper.is_some() || e.dimension.is_some() diff --git a/crates/engine/src/concept_vector/tests.rs b/crates/engine/src/concept_vector/tests.rs index afc6698076..b53a0ab2f1 100644 --- a/crates/engine/src/concept_vector/tests.rs +++ b/crates/engine/src/concept_vector/tests.rs @@ -1077,13 +1077,16 @@ fn insert_puts_the_results_outside_a_live_paint_group() { assert!(*d.node(group).unwrap() == before, "the group is unchanged"); } -/// For an image in a graph, Shaper, dimension or flare group or a compound shape, the results go -/// beside the group, whose members stay as they are. +/// For an image in a graph, Shaper, dimension or flare group, a compound shape or a plug-in's +/// generated art, the results go beside the group, whose members stay as they are. #[test] fn insert_puts_the_results_outside_the_other_generated_groups() { use vectorcraft_doc::dimension::{Dimension, DimensionMode, DimensionOptions}; type Mark = fn(&mut Node); - let kinds: [(&str, Mark); 5] = [ + let kinds: [(&str, Mark); 6] = [ + ("plug-in generated art", |g| { + g.extras_mut().generated = Some(Box::new(vectorcraft_doc::generated::GeneratedArt::new("test.plugin", "Test", serde_json::Map::new()))); + }), ("graph", |g| g.extras_mut().graph = Some(Box::default())), ("Shaper", |g| g.extras_mut().shaper = Some(Box::default())), ("dimension", |g| {