.ai graphs: a filled-line series keeps no stroke, so turning Draw Filled Lines off draws its thin line

A series read from bands with unstroked markers, or bands alone, kept an
explicit no-stroke paint. With Draw Filled Lines turned off, the thin line
took that paint and was not drawn. Such a series now keeps no stroke, as a
graph drawn here does, and its thin line is drawn in the series color at
1 pt. A series whose markers carry a stroke keeps it.
This commit is contained in:
dotCooCoo
2026-11-16 04:36:43 -08:00
parent f8fe5f06e1
commit 4e8ff28cb4
3 changed files with 23 additions and 9 deletions
+11 -2
View File
@@ -9538,11 +9538,20 @@ fn a_drawn_graph_with_filled_lines_saved_as_ai_opens_with_them() {
let mut again = Session::new();
again.execute("document.open", &json!({"path": path})).unwrap();
let mut graphs = vec![];
again.doc().unwrap().doc.walk(|n| graphs.extend(n.extras().graph.as_deref().cloned()));
again.doc().unwrap().doc.walk(|n| graphs.extend(n.extras().graph.as_deref().map(|g| (n.id, g.clone()))));
assert_eq!(graphs.len(), usize::from(live), "{width:?} {name}");
if let Some(g) = graphs.first() {
if let Some((gid, g)) = graphs.first() {
assert_eq!((g.kind, g.cells(), g.filled_lines, g.line_width), (written.kind, written.cells(), true, width), "{width:?} {name}");
assert_eq!(g.filled_line_width(), written.filled_line_width(), "{width:?} {name}");
// With Draw Filled Lines turned off, each series draws its thin 1 pt line again.
again.execute("select.set", &json!({"ids": [gid.0]})).unwrap();
again.execute("graph.setType", &json!({"id": gid.0, "filledLines": false})).unwrap();
for series in 0..2 {
let line = series_parts(&again, *gid, series)
.into_iter()
.any(|p| p.appearance.fill_paint().is_none() && !p.appearance.stroke_paint().is_none() && p.appearance.stroke_width() == 1.0);
assert!(line, "{width:?} {name}: series {series} draws no thin line");
}
}
}
}