Commit Graph
5768 Commits
Author SHA1 Message Date
BFlat 751c4ee144 Merge pull request #4243 from dotCooCoo/fix/undo-scope-cancel-forgets-cut-journal-entries
Undo: a canceled undo scope drops the journal entries it cut from open undo groups
2026-10-26 17:02:11 +07:00
dotCooCoo 389dce727d Undo: a canceled undo scope drops the journal entries it cut from open undo groups
When an undo scope that joined an open undo group was canceled, the
journal was cut back to where the scope began, but the group still
listed the cut entries' numbers. The next command took one of those
numbers, so a later cancel of the group also removed that command's
entry, even when it ran in another document, and a replay of the
journal no longer matched the documents. end_undo_scope now removes
the cut numbers from every open undo group's journal entries and batch
steps.
2026-10-26 16:58:49 +07:00
BFlat b44d2500e3 Merge pull request #4240 from dotCooCoo/fix/brush-art-symbol-renames
Render: brush art is made again when a symbol or pattern it shows is renamed
2026-10-26 16:40:00 +07:00
dotCooCoo 1edfb8f450 Render: brush art is made again when a symbol or pattern it shows is renamed
The brush cache dropped brush art that can show a symbol or a pattern
only when the art of the document's symbols or patterns changed. Renaming
one, for example swapping the names of two symbols, left their art as it
was, so a brush whose art holds an instance of one of those names kept
drawing the old symbol. The cache now compares the names along with the
art.
2026-10-26 16:38:04 +07:00
BFlat 1cdc98735c Merge pull request #4238 from nrq6993-a11y/stream/vc-featD-g8-eps-dedupe-typecheck-tests
G8: EPS import regression tests for operator type checks
2026-10-26 16:08:42 +07:00
BFlat a2014395bb Merge pull request #4144 from Taha-Mahmoodi/feat/port-double-click-breaks-thread
Type: a double-click on a threaded port breaks the thread there
2026-10-26 16:06:52 +07:00
nrq6993-a11y 97652362fa G8: EPS import regression tests for operator type checks
## What and why

Hostile EPS programs that give an operator the wrong operand type (a non-integer count, a non-procedure body, a non-boolean condition) must stop the import with a `typecheck` error instead of misbehaving. One test per operator: copy, for, idiv, if, ifelse, index, loop, mod, repeat, roll and srand. The tests only: the limits and checks they cover are already on main, so the tests pin that behaviour so a later change can't silently drop it.

## How it was tested

The new tests pass, along with the full `cargo xtask ci` on the branch.

Combines the tests from: stream/vc-featD-g8-eps-copy-typecheck-count, stream/vc-featD-g8-eps-for-typecheck-procedure, stream/vc-featD-g8-eps-idiv-typecheck-operand, stream/vc-featD-g8-eps-if-typecheck-condition, stream/vc-featD-g8-eps-if-typecheck-procedure, stream/vc-featD-g8-eps-ifelse-typecheck-condition, stream/vc-featD-g8-eps-ifelse-typecheck-procedure, stream/vc-featD-g8-eps-index-typecheck-count, stream/vc-featD-g8-eps-loop-typecheck-procedure, stream/vc-featD-g8-eps-mod-typecheck-operand, stream/vc-featD-g8-eps-repeat-typecheck-count, stream/vc-featD-g8-eps-repeat-typecheck-procedure, stream/vc-featD-g8-eps-roll-typecheck-j, stream/vc-featD-g8-eps-roll-typecheck-n, stream/vc-featD-g8-eps-srand-typecheck-operand
2026-10-26 16:06:20 +07:00
Taha-Mahmoodi de151f849a Type: the thread-break comments describe the behaviour in our own words
Review follow-up (CodeRabbit, clean-room): two doc comments quoted the
cited help page. Comments only.
2026-10-26 16:00:39 +07:00
Taha-Mahmoodi 54d9fbc162 Type: a double-click on a threaded port breaks the thread there 2026-10-26 16:00:39 +07:00
BFlat b25fdead4f Merge pull request #4236 from dotCooCoo/fix/type-on-a-path-tool-options
Toolbar: double-clicking the Type on a Path tool opens Type on a Path Options
2026-10-26 15:47:36 +07:00
dotCooCoo 45440b5444 Toolbar: double-clicking the Type on a Path tool opens Type on a Path Options
A double-click on the Type on a Path or Vertical Type on a Path tool
reported that the tool has no options. It now opens Type on a Path
Options for the selected type on a path, the same dialog as Type ›
Type on a Path › Type on a Path Options…. With nothing selected, or
with no type on a path selected, nothing opens and `tool.options`
returns the menu command's error, as the Rotate tool's double-click
does without a selection.

Docs: docs/control-protocol.md, the `tool.options` params doc.
2026-10-26 15:44:50 +07:00
BFlat af3e049d46 Merge pull request #4141 from Taha-Mahmoodi/feat/pathfinder-options
Fix #3426: the Pathfinder panel's Pathfinder Options… sets Precision, Remove Redundant Points and Divide and Outline Will Remove Unpainted Artwork
2026-10-26 15:37:14 +07:00
BFlat ea5c020da7 Merge pull request #4235 from Atalantis/macos-dialog-localizations
macOS: declare the UI languages so the open and save panels are translated
2026-10-26 15:36:58 +07:00
BFlat 660f485243 Merge pull request #4020 from Taha-Mahmoodi/feat/brush-libraries
Brushes: Window › Brush Libraries opens brush libraries whose brushes click or drag into the document's Brushes
2026-10-26 15:29:24 +07:00
Taha-Mahmoodi cfd085f34a Fix #3426: the Pathfinder panel's Pathfinder Options… sets Precision, Remove Redundant Points and Divide and Outline Will Remove Unpainted Artwork
Squashed from #4141 onto main.
2026-10-26 15:28:51 +07:00
Florent Siegenthaler a8345dcfb1 Declare the UI languages to AppKit so the open and save panels are translated 2026-10-26 15:28:39 +07:00
Taha-Mahmoodi 0a241a7fdd Brushes: Window › Brush Libraries opens brush libraries whose brushes click or drag into the document's Brushes
Squashed from #4020 onto main.
2026-10-26 15:17:30 +07:00
BFlat a1ef364191 Merge pull request #4234 from ham9zah/fix/ai-blend-check-followups
Import: live blend check follow-ups
2026-10-26 15:15:24 +07:00
ham9zah 9a05383f34 Import: live blend check follow-ups
Review follow-ups to the live blend import (#4127):

- The check's grid saturates its neighbours' keys: a step far out (a
  coordinate like 1e300) saturates its cell, and the cells round it
  overflowed (a panic in debug builds, a wrong cell in release).
- Each laid object matches one drawn step: two drawn steps near one laid
  object no longer both take it, so a drawing the blend doesn't lay out
  isn't taken for it (the drawn steps stay).
- A blend's record is read to the length its XP gives: hex digits after
  it on the last line no longer spoil it.

Tests: a laid object matches one drawn step, 1e300 coordinates in the
check and in the import fuzz property, and a record line longer than
the record.
2026-10-26 15:11:45 +07:00
BFlat 853f4363ca Merge pull request #4127 from ham9zah/fix/ai-live-blends
Import: Illustrator blends come in as live blends
2026-10-26 14:23:53 +07:00
BFlat 4ddab29960 Merge pull request #4142 from Taha-Mahmoodi/feat/delete-empty-artboards
Artboards: the Artboards panel's Delete Empty Artboards deletes every artboard with no artwork in one undo step
2026-10-26 14:23:37 +07:00
ham9zah 4214d4c9d3 Import: live blends are checked in bounded time and keep no stray art
Review follow-ups for the live blend import:

- The check of a blend against its drawn steps matched every drawn step
  against every laid one and measured centres inside the loop, so a
  crafted blend (64 keys, 1,000 steps between each) could stall the
  import. Centres and fills are now measured once, and each drawn step
  finds its neighbours through a grid of cells the tolerance wide.
- A blend lays out at most 5,000 objects to be made live, and all the
  blends of one import at most 50,000 (each laid out twice, once per
  orientation); past either, the drawn steps stay, with the note. The
  live steps take the place of drawn steps already counted against the
  reader's object limit.
- A fill the check can't compare (a gradient, a pattern) or a missing
  one no longer passes: the fills must both be none or solid colours
  within the tolerance.
- When what follows the blend's own art isn't a group of drawn steps,
  that art (its keys and spine) goes too, with the note, instead of
  staying drawn.
- The spine test can no longer pass without asserting: a spine written
  backwards keeps the keys' order (live), and a curved spine is read
  exactly while its straight-drawn steps stay drawn. New tests for steps
  with a gradient, for the blend's art when its steps aren't a group,
  and for the budget; import_fuzz gains a mutated-blend property and a
  large-blend test (998 steps live, 1,500 kept drawn, both quickly).
2026-10-26 14:10:37 +07:00
ham9zah f8bcf69b23 Import: Illustrator blends come in as live blends
A blend in a .ai file's editing data came in as plain art twice over:
the blend's own art (its key objects and spine, on `%_` lines) and its
drawn steps were both kept visible, so the keys lay doubled under the
drawn ones and the spine showed as a stray path, and nothing was live.
The spine itself was read exactly (its line and curve segments match).

The `(Adobe Path Blends) 1 0 n XP` record is now read (n bytes of hex on
the `%` lines after it, capped, checked: `DCBA`, version 1, the key
count and a record per key starting with its id). Each object's
dictionary names its part (`ShapeBlendPathType` K or S) and a key's id
(`ShapeBlendPathID`); the keys the record lists and the spine become one
live blend, the keys sitting on the spine's anchors. The record's other
fields aren't known, so the spacing is the drawn steps between two keys
(Specified Steps) and the orientation whichever lays the blend out as
drawn; the blend replaces the drawn steps only when it comes out as
drawn (each step within 0.5 pt and 0.02 of its colour). Otherwise the
drawn steps stay, without the blend's own art over them, with a note.
Behaviour as documented: https://helpx.adobe.com/illustrator/using/blending-objects.html

Save As .ai writes the PDF-compatible part only (no editing data), so a
blend is written back as its steps drawn, not live.

Hand-written tests: two keys and a straight spine as one live blend with
three steps and interpolated colours; a curved spine (l, c, L) in both
directions keeping its points and the keys' order; a garbled or short
record, a key without an id and ids the record doesn't list keeping the
drawn steps with a note; moving a key moving the steps; record parsing
on hostile input. The import fuzz target gains the record and the new
mesh keys.
2026-10-26 14:10:37 +07:00
Taha-Mahmoodi a34055beec Artboards: the Artboards panel's Delete Empty Artboards deletes every artboard with no artwork in one undo step
Squashed from #4142 onto main.
2026-10-26 14:10:36 +07:00
BFlat 0b5affef5e Merge pull request #4166 from Taha-Mahmoodi/fix/2691-repeat-grid-handles
Repeat: a selected Grid Repeat has on-canvas handles for its rows, columns and spacing (part of #2691)
2026-10-26 13:49:33 +07:00
BFlat b36d9b7160 Merge pull request #4230 from Silvertree2010/fix/h2780-svg-import-css-declaration-parse
Respect quotes and parentheses when splitting SVG CSS declarations
2026-10-26 13:46:38 +07:00
Taha-Mahmoodi 5b91057dca Repeat: a selected Grid Repeat has on-canvas handles for its rows, columns and spacing
With the Selection tool, a single selected grid repeat shows a handle below the grid (rows), one right of it (columns), one past its bottom-right corner (both) and sliders between its first two columns and rows (horizontal and vertical spacing), as the public Set grid repeat options page describes. Each drag previews object.repeat.options and commits as one Repeat Options undo step; Escape cancels, and a drag that ends where it began leaves no step. Bounding-box handles keep priority where they overlap, and the controls hide with the edges or the bounding box. Before, a drag there scaled the source or started a marquee.

Part of #2691.
2026-10-26 13:44:06 +07:00
NetterSilverandClaude Haiku 5.5 29a98b750a Respect quotes and parentheses when splitting SVG CSS declarations
Found while testing crates/svg/src/import/css.rs:21 (parse_decls)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 13:43:20 +07:00
BFlat bb3ee0a260 Merge pull request #4210 from KaboomFox/pdf-tests-dated-alike
PDF tests: exports compared byte for byte are dated alike
2026-10-26 13:40:00 +07:00
BFlat ddc72e4886 Merge pull request #4227 from ncic/pencil-mouse-samples
Canvas: a mouse's moves between frames reach the tool too
2026-10-26 13:38:20 +07:00
Louise FoxandClaude Opus 5.5 1466317301 PDF tests: exports compared byte for byte are dated alike
dithered_perceptual_gradients_export_as_images_with_noise_on_the_fill
compares two exports byte for byte: a stroke's file with dither and
without. The export dates a file by the clock, in whole seconds
(metadata::output_time, unless SOURCE_DATE_EPOCH is set), and the
tests' `uncompressed` helper gave no date of its own. So the test
failed whenever a second ticked between the two exports: the files
then differed in /CreationDate, /ModDate, the XMP dates and the IDs
made from them, and in nothing else. CI hit it on #3807.

With the wall clock moved a second on each read (an LD_PRELOAD shim
on clock_gettime), the test failed 5 runs of 5, and it was the only
one of vectorcraft-pdf's 380 tests that did. With the helper's date
fixed it passes, as do the other 379.

The helper now dates its exports `created: Some(0)`, as the crate's
other tests that compare whole files do (tests_editing, tests_pdf13,
tests_webview).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HhvnnnD5fTFupK8WWq35un
2026-10-26 13:37:40 +07:00
ncicandClaude Opus 5.5 21a9e854e1 Tools: only the freehand tools get every move of a frame (#4227 review)
Every pointer move of a frame went to whatever tool was active, so with
a fast mouse (or a pen) a tool whose drag preview is costly (the
Selection tool moving a large selection, Free Distort, the Width tool)
redid it for each, up to 64 times a frame.

Tool::wants_samples (default false) says a tool builds a stroke from
the drag's samples: the Pencil, Paintbrush, Blob Brush, Eraser, Knife,
Smooth and Path Eraser answer true (the Paintbrush through its wrapper),
the Join tool doesn't. The canvas still reads the frame's moves every
frame, so the macOS feed's pressures stay paired, but replays them only
to such a tool; every other tool gets one drag a frame at the latest
position. A frame whose moves end where the last frame's did still
reaches the tool.

Tests: only_the_freehand_tools_get_every_move_of_a_frame (Pencil,
Paintbrush and Blob Brush get the 19 moves before the last, Selection,
Direct Selection and Width none),
a_mouse_stroke_keeps_a_frame_that_ends_where_it_started,
the_freehand_tools_want_every_sample, and
a_mouse_stroke_keeps_every_move_of_a_frame now checks every position in
order, not only the count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:31:52 +07:00
ncicandClaude Opus 5.5 954d3f3116 Canvas: a mouse's moves between frames reach the tool too (#3328)
The canvas hands a dragging tool every position the pointer passed
within a frame for pens and fingers (touch events) and for a macOS pen
(the stylus feed's moves, #852), but a mouse got the frame's last
position only: one sample per frame. A fast mouse stroke kept a
position every 10 to 20 px, too few for any Fidelity to follow the
hand, and fewer still while the app is busy and frames come slower.

frame_moves now keeps a mouse's moves as well, without a pressure (the
tool takes the host's latest, a mouse's being full; a pen's on X11
among them), with the same bound of 64 moves for a stalled frame, as
touch and pen moves already reach every tool.

Tests: a_mouse_stroke_keeps_every_move_of_a_frame (20 moves in one
frame reach the Pencil; it got 2 points before this change), and
frame_moves_keeps_touch_feed_and_mouse_samples_with_their_pressure
replaces the test that a mouse's moves were left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:31:52 +07:00
BFlat e9eec8fdeb Merge pull request #4229 from nrq6993-a11y/stream/vc-feat3-g4-loaded-text-cursor
G4: draw loaded-text cursor for threaded overflow
2026-10-26 13:09:43 +07:00
nrq6993-a11y c640f40ce1 G4: draw loaded-text cursor for threaded overflow
Squashed from #4229 onto main.
2026-10-26 13:09:22 +07:00
BFlat ad588ef028 Merge pull request #4225 from ncic/pencil-live-preview
Pencil: Live preview option in Pencil Tool Options
2026-10-26 12:59:05 +07:00
ncicandClaude Opus 5.5 21e9c8ff31 Pencil: Live preview option, a thin line while drawing when it is off
A Pencil stroke always previewed as the path it draws, with its full
appearance: with a fill set, the fill flipped between the shape and its
inside-out as the stroke crossed itself or curved back, and hid the line
being drawn.

Pencil Tool Options get a Live preview checkbox, above Live curve
fitting, on by default and kept with the tool's other options
(`livePreview`, settings.rs). With it off, the stroke previews nothing
while it is drawn: a thin line follows the pen (the drag overlay the
Knife and Blob Brush already show), and the release, or a switch of
tool mid-stroke, draws the path with its fill and stroke, as one undo
step, as before. Escape still cancels the stroke. With it on nothing
changes. The Paintbrush has no such option and keeps previewing.

Public reference: Draw and edit paths using the Pencil tool,
https://helpx.adobe.com/illustrator/using/tool-techniques/pencil-tool.html
(lists Live preview and Live curve fitting among the Pencil's options).

The checkbox label is translated in all 24 catalogs.

Tests: pencil_with_live_preview_off_shows_a_thin_line_until_the_release
(tools), pencil_with_live_preview_off_draws_the_filled_path_on_release
(engine), and the freehand dialog test shows the checkbox for the Pencil
only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:52:32 +07:00
BFlat 9a9d6dae3e Merge pull request #4222 from dotCooCoo/fix/i18n-scan-skips-comments-reads-disabled-reason
i18n: the message scan skips comments and reads EngineError::Disabled's reason
2026-10-26 12:23:59 +07:00
BFlat 3a8181f091 Merge pull request #4213 from DCaioP/fix/decimal-comma-in-unit-fields
Fix #3837: unit fields read a decimal comma as a decimal point
2026-10-26 12:23:43 +07:00
dotCooCoo 64f29d5848 i18n: the message scan skips comments and reads EngineError::Disabled's reason
The message scan read the first argument of every error variant, so
for EngineError::Disabled it read the command id and missed the reason
the status bar shows. It also read error calls inside comments, such as
a commented-out bad(cmd, "..."), as messages that need catalog rows.
The scan now reads Disabled's second argument and removes // and
/* ... */ comments (nested ones included) before it looks for calls. A
// or /* inside a string or character literal does not start a comment.
2026-10-26 12:20:24 +07:00
Caio Pontes aaf574b845 Fix #3837: a thousands comma is refused, not read as a decimal
Review: reading `1,000` as 1 would give someone who writes decimals
with a point a value a thousand times too small, with no sign that
anything went wrong; refusing it, as before, is the safer answer.

A number that reads as thousands (one to three digits, a comma,
exactly three digits, then at most a unit: `1,000`, `12,500 mm`) now
keeps its comma, so the field refuses it. `0,125` is still a decimal
(a lone 0 never groups thousands), as are `1,25`, `1,0000` and
`1,500+2`.
2026-10-26 12:20:23 +07:00
Caio Pontes 326f7809b0 Contributors: add Caio Pontes 2026-10-26 12:20:23 +07:00
Caio Pontes 7163bf93db Fix #3837: unit fields read a decimal comma as a decimal point
Typing an offset of `0,1` in Offset Path, in a document in
millimeters, put the field back to the value it had (1 mm), so it
looked as if values under 1 mm were refused. The length parser only
takes a point as the decimal separator, and a field drops text it
can't read.

The shared numeric fields (unit_field, bounded_field and opt_field)
now read a comma as the decimal separator when the text has no point,
so `0,1 mm`, `1,5+0,25` and `12,5%` work in every dialog and panel
that uses them. Text with a point keeps its commas, so `1,000.5` is
still refused. The engine, MCP and control channel keep the strict
format.
2026-10-26 12:20:23 +07:00
BFlat e466320349 Merge pull request #4220 from ncic/pencil-redraw-compound
Pencil: Edit Selected Paths redraws a selected compound path
2026-10-26 11:52:44 +07:00
ncicandClaude Opus 5.5 20476760bc Pencil: Edit Selected Paths redraws a selected compound path's member paths
A selected compound path (a shape with a hole, such as one made with
Object › Compound Path › Make) could not be redrawn with the Pencil or
the Paintbrush: at the press, find_redraw looked only for selected
objects that are paths themselves, and a compound path's paths are its
children. The stroke then drew a new path, which Keep selected selected
in place of the compound path, so every later stroke near the shape drew
a new path too: redrawing seemed to stop working.

- find_redraw takes a selected compound path's member paths as well,
  the nearest one within Edit selected paths within of the press.
- path.freehand's redraw keeps the compound path selected (or, with Keep
  selected off, takes it out of the selection) when the redrawn path is
  one of its members, so the next stroke redraws it too.

Test: pencil_redraws_a_selected_compound_path redraws the outer path and
then the hole of a selected compound path; it fails without this change
(the first stroke draws a new path).

cargo xtask ci: every step passes except one test in `test`,
vectorcraft-pdf tests_import_fidelity::text_becomes_point_type, which
fails the same way on unmodified main on this machine; it is unrelated
to this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 11:49:03 +07:00
BFlat 03b16c8914 Merge pull request #4218 from HEOJUNFO/fix/tab-overflow-scroll
Tab overflow list scrolls to every open document (#4017)
2026-10-26 11:26:00 +07:00
heojunfoandClaude Opus 5.5 452c034329 Tab overflow list scrolls to every open document (#4017)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 11:22:54 +07:00
skylar taylor-barrick 581c79dcb1 M14: distinguish qualification from publication (#4173) 2026-10-25 23:47:58 -04:00
BFlat 3ce284cda3 Merge pull request #4216 from dotCooCoo/fix/trace-rare-budget-blends
Image Trace: a cut-edge blend past the rare-color budget traces as its kept color
2026-10-26 10:43:55 +07:00
dotCooCoo 5d2a9099f1 Image Trace: a cut-edge blend past the rare-color budget traces as its kept color
The loop that keeps rare colors stopped at the first color past the
budget of six, so a cut-edge blend listed after it was not recorded as
tracing as its rare color, even when that rare color was kept, and its
pixels went to the nearest color instead. The loop now goes on past the
budget and only stops keeping new rare colors. It moves into
`kept_rare`, which a new test calls with seven rare colors and a blend
of the first.

The test of an outline over a cut edge in the color of other art also
checks that the dark paths reach the top and the bottom of the disc,
which no bar comes near: before, the bars alone met its checks.
2026-10-26 10:41:54 +07:00