Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions node-graph/nodes/vector/src/vector_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1269,12 +1269,20 @@ async fn separate_subpaths(_: impl Ctx, content: List<Vector>) -> List<Vector> {
content
.into_iter()
.flat_map(|row| {
let bezpaths = row.element().stroke_bezpath_iter().collect::<Vec<_>>();

// Pass the original element through unchanged when it has no subpaths, so its attributes
// (such as the layer transform) survive downstream rather than being dropped along with the empty list.
if bezpaths.is_empty() {
return vec![row];
}

let style = row.element().style.clone();
let (element, attributes) = row.into_parts();
let (_, attributes) = row.into_parts();

element
.stroke_bezpath_iter()
.map(move |bezpath| {
bezpaths
.into_iter()
.map(|bezpath| {
let mut vector = Vector::default();
vector.append_bezpath(bezpath);
vector.style = style.clone();
Expand Down
Loading