Graphs: redraw graphs a paste or library adds a design for, reuse redrawn symbols

- A paste that adds a design the document lacked draws the document's
  graphs that name it again, in the same undo step; the pasted graphs keep
  their art.
- A library design brings along the designs its art uses, and the graphs
  that name any of them are drawn again. A design the document keeps
  brings none of the library design's resources.
- Only a series that draws a design is redrawn for it: a marker counts
  while Mark Data Points is on or the legend has an entry for the series,
  and a column design counts for a column or bar series.
- A symbol pasted a second time is the one the first paste added and drew
  again with the document's designs.
- Renaming a design renames it in the graphs of symbols and opacity masks,
  and Select Unused counts those graphs.
- swatch.library.load reads a file no further than the 256 MB limit.
This commit is contained in:
dotCooCoo
2026-11-19 06:18:09 -08:00
parent 4137b8e50a
commit 9d2bbbc6b4
7 changed files with 526 additions and 61 deletions
+5
View File
@@ -1625,6 +1625,11 @@ fn paste_clip(s: &mut Session, p: &Value, mode: PasteMode, clip: &Clipboard, cho
super::graph::redraw_with_designs(d, &new_ids, &imported.kept_designs)?;
super::graph::redraw_symbols_with_designs(d, &imported.added_symbols, &imported.kept_designs);
}
// The graphs already in the document that draw with a design the paste added are drawn
// again with it; the pasted ones already draw with it.
if !imported.added_designs.is_empty() {
super::graph::refresh_graphs(d, &imported.added_designs, &new_ids, &imported.added_symbols)?;
}
sel.set(new_ids.iter().copied());
// Copied ruler guides (#3226): on the layer new art goes to, moved as the objects are (a
// paste of guides alone keeps them where they were, but onto another artboard or every