Commit Graph
442 Commits
Author SHA1 Message Date
.CooCoo 337d644214 Merge pull request #10869 from dotCooCoo/fix/dwg-replace-keeps-selection
DXF Import: a failed DWG Replace keeps the user's selection
2026-12-05 19:15:06 -08:00
.CooCoo 12f78e75d1 Merge pull request #10806 from yoriswind/codex/10799-freeform-point-eyedropper
Gradients: sample a color into a freeform point
2026-12-05 19:08:07 -08:00
dotCooCoo 14f92a1fa1 DXF Import: a restored Objects on Path member keeps the paints
A restored selection loads its paints for new art only when the journal
records it with a selection command that loads them on replay. An
Objects on Path member, recorded as object.objectsOnPath.selectMember,
now keeps the paints as they are, as a symbol part already does.
2026-12-05 17:46:16 -08:00
dotCooCoo 374176f3c6 DXF Import: a restore inherits after a defaults-only paint; a part keeps the paints
Restoring a selection now clears the marker a defaults-only paint left,
as every top-level command does, so new art takes the restored
selection's appearance live as it does when the journaled select.set
replays. A restored symbol part no longer loads its paints for new art,
as symbol.instance.selectPart, the step the journal records for it,
does not.
2026-12-05 16:01:45 -08:00
dotCooCoo 1ecc70f959 Merge main into fix/stroke-weight-draft-target 2026-12-05 13:17:37 -08:00
dotCooCoo 8848ba21f3 DXF Import: a restored selection is journaled and loads its paints
When a failed DWG Replace gives the user's selection back in the active
document, the journal now records that selection (through the same steps
an interaction uses, in open undo groups too), so a recorded action
replays later commands on the restored objects. The paints for new art
load from the restored selection as they do after select.set, so the
next shape does not take the swapped object's paints.
2026-12-05 10:10:08 -08:00
dotCooCoo 17719029b6 Merge main into fix/stroke-weight-draft-target 2026-12-05 09:18:36 -08:00
dotCooCoo 2e58bf49f7 Merge main into fix/live-shape-draft-target 2026-12-05 07:59:51 -08:00
dotCooCoo 6d69b431ce Merge main into fix/dwg-replace-keeps-selection 2026-12-05 07:32:16 -08:00
dotCooCoo 0a0ebb5279 Plug-ins: a file placed during an add-on preview survives Cancel
With an add-on dialog previewing (Arrange in Grid, for example),
File > Place ran inside the preview's interaction, because every
`file.*` command other than `file.documentColorMode` was treated as one
that reads the drawing on show. The placed art went into the preview
document with no undo step of its own, and Cancel removed it.

`file.place` now runs on the document without the preview, as other
edits do: it records its own undo step and stays after Cancel and OK.
Save, Export, Copy and the other `file.*` commands still act on the
drawing as the preview shows it.

Docs: docs/mcp.md (undo/redo row).
2026-12-05 07:03:59 -08:00
dotCooCoo 7e065a97af Merge main into fix/live-shape-draft-target 2026-12-05 06:10:19 -08:00
dotCooCoo cd08707be8 Undo: canceled undo groups and scopes count only as history restores
Since #10882 a canceled undo group, and a canceled undo scope that put
back an earlier snapshot, advance history_restores, which every edit
target that reads rollbacks also hashes. They no longer advance
rollbacks as well, and the two engine tests for that are removed;
history_mem.rs covers the count.

The Corner Radius tests now cancel an interaction whose preview drew
the shape, which only rollbacks counts, so they still fail without
rollbacks in corner_target.
2026-12-05 06:06:15 -08:00
dotCooCoo ce94641041 Merge main into fix/stroke-weight-draft-target
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	apps/vectorcraft-web/Cargo.toml
#	xtask/src/pdf_deps.rs
2026-12-05 05:58:08 -08:00
.CooCoo 5164c977d0 Merge pull request #10918 from dotCooCoo/fix/new-type-new-art-appearance
Type: new type takes new art's fills, strokes and effects
2026-12-05 04:35:37 -08:00
dotCooCoo 88a915b308 Merge main into fix/live-shape-draft-target 2026-12-05 04:35:17 -08:00
dotCooCoo 9ac0fe0fae Type: Discard Empty Type drops unfinished panel values for the text it removes
When the Type tool leaves an empty text object, Discard Empty Type
takes back the step that made it, which also frees the text's node ID.
It did not advance the document's rollback count, so a value typed in
a panel field for the text and not yet committed (Opacity, for example)
stayed in the field, and the next Enter applied it to a new object that
took the same ID. Discard Empty Type now advances the count.

A command that panics puts back every document it changed. That restore
now advances the rollback count of each document whose snapshot it puts
back, for the same reason.

Tests: an engine test for each restore, and a Transparency panel test
that types 20+ in Opacity for an empty text, discards it, selects a new
rectangle with the same ID and types 1 and Enter.
2026-12-05 00:29:22 -08:00
dotCooCoo 949b344784 Merge main into fix/new-type-new-art-appearance 2026-12-04 23:35:06 -08:00
dotCooCoo cdfcef172f Type: new type's style link stays in its document, gradients fit the wrapped frame
New art and type took the graphic style picked with nothing selected by
its name, so in another document they were linked to a style of the same
name there, and took its isolate and knockout. The template now records
the document the style came from, and new art elsewhere takes the look
without the link.

New area type that text wrap moves as it is made (an Auto Size frame
below a wrap object grows) had the template's placed gradients fitted to
the frame before the reflow. Both ways of making type now let text wrap
reflow it first and fit the gradients to the frame it ends with; type
whose bounds do not change keeps its placement.

The docs name text.create as the command whose type takes the template,
state that Type on a Path and Area Type keep the default appearance, and
note that a color given to text.create keeps the characters' fill under
Override Character Color.
2026-12-04 23:35:05 -08:00
dotCooCoo 3b580bd6ce Merge main into fix/stroke-weight-draft-target 2026-12-04 23:16:54 -08:00
dotCooCoo 146602fc95 Merge main into feat/concept-to-vector-providers 2026-12-04 23:02:25 -08:00
dotCooCoo 32300eea57 Merge main into fix/dwg-replace-keeps-selection 2026-12-04 22:36:45 -08:00
.CooCoo 65d61c56db Merge pull request #10133 from dotCooCoo/feat/font-sheet
Type Tools: Create Font Sheet sets a sample text in every font, labeled
2026-12-04 22:36:34 -08:00
dotCooCoo 9d8ecd1341 DXF Import: a failed Replace restores the selection after unrelated edits
The user's selection came back only while the document revision was
unchanged, so a Replace whose rollback raised the revision, or any edit
that left the selection alone, kept the swapped object selected.

DocState now counts selection changes (`selections`): every
Session::select, Undo and Redo, leaving isolation, and any command or
batch step that leaves another selection. A failed command that selected
its ids first puts the count back with the selection. The selection
comes back when the count, the selection, the isolation and the user's
objects are unchanged; a symbol part needs the art unchanged.
2026-12-04 22:35:37 -08:00
.CooCoo 5ba94c7509 Merge pull request #10882 from dotCooCoo/fix/raster-settings-opened-objects
3D: Raster Settings OK sets the objects the dialog opened on
2026-12-04 22:28:20 -08:00
dotCooCoo 65702eb1fe Transform: an unfinished live shape value stays with the shape it was typed for
The live shape fields in the Transform and Properties panels and the
Contextual Task Bar (a rectangle's, polygon's or ellipse's Angle, a
polygon's Sides, Radius and Side Length, a star's Points and Ratio, an
ellipse's Pie Start and End Angle, and a line's Line Length and Line
Angle) kept a typed but unfinished value when another shape was
selected. If the new shape showed the same value, the field went on
showing the old text, and the next Enter applied it to the new shape:
"3+" typed for one rectangle, then "7" and Enter after selecting
another, turned the second one 10 degrees.

Each field now passes NumberField::edit_target the active document, its
File > Revert count, its Undo and Redo restore count, its rollback count
and the selected objects, which object.setLiveShape changes. A change of
any of them drops the unfinished value and the field shows the new
shape's value. An edit that leaves the selection as it is keeps the
value typed so far. The target is hashed once per document revision and
kept in CanvasCache::shape_edit_target, as the shared angle beside it
is.

DocState::rollbacks counts the other ways an older document snapshot
and its node ID counter come back, after which a new shape can take the
node ID of the shape a value was typed for:

- a canceled undo group, or a canceled undo scope that changed the
  document;
- canceling an interaction whose preview changed the document;
- Exit Symbol Editing Mode with nothing changed, which takes back the
  entering step;
- a plug-in run made away from the session that ends without applying
  after its calls changed the document;
- a preview that discards an earlier preview that allocated node IDs,
  or that fails after discarding an earlier preview's change. The
  count goes to the document whose preview was discarded, also when
  the preview activates another document;
- a command run during a tool interaction that sets aside a preview
  that allocated node IDs.

history_restores still advances only on Undo and Redo.
2026-12-04 21:56:06 -08:00
dotCooCoo 4125361350 Stroke: drop an unfinished value when the stroke it edits changes
A value typed into the Stroke panel's Weight, Miter limit, dash, gap,
Dash offset or arrowhead Scale field without Enter stayed in the field
after another object with the same value was selected, and Enter then
applied it to the new selection: "3+" typed for one line and finished as
"1" on another set that line to 4 pt. The Appearance panel's weight
fields and the Control bar and Properties weight fields did the same.

The fields now take an edit target: the document, its File > Revert
count, the revision of the document the next edit builds on, the
new-art paint, the selection and its subjects, the active Appearance
row, the symbol part, the Live Paint Bucket, the Type tool's characters
or story, and the Global Edit members. When it changes, the field drops
the unfinished value and keeps its focus. While the stroke editor's or
the arrowhead Scale fields' own scrub or step runs, they keep the target
they started with, and an outside change to the document ends the
gesture.

A command that replaces a tool drag's starting document, or changes the
perspective grid during a drag, now advances the drag's baseline
revision, so the target changes with it.

craft-libs is pinned to the commit that adds StrokeEditor::edit_target
and LinkedFields::edit_target.
2026-12-04 21:41:36 -08:00
dotCooCoo 168d6c9cce Plug-ins: an outside command leaves recut paths and a refused step alone
During an add-on dialog's preview, a command from outside the dialog no
longer acts on a path whose selected anchors the preview renumbered (Set
Corners recut it), so Clear does not delete other points of the base
path. A refused outside command leaves the dialog's own selection as it
was, while a command that ran, such as Deselect, still sets it. The
journal records the selection the command acts on before it, so an
action replays it on the same objects.
2026-12-04 21:17:55 -08:00
dotCooCoo 31876d6775 Merge main into feat/font-sheet 2026-12-04 20:36:17 -08:00
dotCooCoo c5e2098a59 Merge main into fix/raster-settings-opened-objects
# Conflicts:
#	ROADMAP.md
2026-12-04 19:25:58 -08:00
dotCooCoo eb1e5b6b14 3D: Raster Settings OK refuses after a canceled edit or during a tool edit
A canceled undo group, or a canceled undo scope that put back an earlier
snapshot, now advances the document's history restore count, as Undo
and Redo do. The same steps can make an equal object with the same id
again after such a cancel, so Raster Settings, Placement Options and
Create Object Mosaic ask to be reopened. A scope canceled without an
edit puts back the same snapshot and does not count.

Raster Settings OK also refuses while a tool edit computed on another
thread is pending, since running the command would apply that edit
first, after the targets were checked.

When the objects the dialog opened on render again, OK clears their
earlier fallback warning from the status bar while it still shows it,
unless a selected object still gives that warning; the selection's
first other warning takes its place.
2026-12-04 19:04:33 -08:00
dotCooCoo dc65d03200 Plug-ins: an outside command acts on the selection an add-on preview shows
During an add-on dialog's preview, a command from outside the dialog
now uses the selection on show, without the objects the preview made,
instead of the selection from before the preview, so Clear no longer
deletes art that was not shown selected. A failed preview runs again
when an outside command changes only the selection, and the new-art
paints a selection command loads stay with the selection it made.
2026-12-04 17:52:09 -08:00
dotCooCoo 632598888f Plug-ins: an edit made during an add-on preview survives Cancel and OK
With Add Artboard Guides previewing, deleting an artboard from the
Artboards panel ran inside the preview's interaction. On the next frame
the dialog could no longer find its artboard, canceled the preview, and
the cancel put the deleted artboard back. The same happened in every
add-on dialog: any command run while its preview showed was undone by
the next preview or by Cancel.

An add-on dialog's preview now marks its interaction (`dialog`). A
command from outside the dialog sets that interaction aside, runs on
the document without the preview as an undo step of its own, and the
dialog previews again from the command's result and selection, as a
tool drag already does. `edit.copy` and the `file.*` commands other
than `file.documentColorMode` still act on the document as the preview
shows it, and Edit Points Only keeps the old behavior, since it
previews a selection. A preview whose snapshot an outside command
changed runs again, also after a failed run.

Docs: docs/mcp.md (undo/redo row).
2026-12-04 17:29:37 -08:00
dotCooCoo 635a726c1f Merge main into feat/concept-to-vector-providers
Conflicts resolved by keeping both sides: the session state and script
and batch rollbacks keep the Concept to Vector jobs beside main's retype
hand-off, clipboard counts and plug-in events; the plug-in deny list
keeps main's entries in order. The Control bar and Properties' Quick
Actions take main's framework buttons with Concept to Vector added
after Crop Image, and the task bar test uses main's helpers. In
docs/ui-parity.md the Concept to Vector row moves into main's table
with its Headless column.
2026-12-04 15:41:35 -08:00
dotCooCoo 308e672673 DXF Import: a restored selection goes through the selection filters
When a DWG Replace fails or is canceled, the user's whole selection now
goes back through the selection filters as they are at that moment:
ruler guides locked since are left out, hidden or locked slices stay
out, and new art on a locked artboard is selected again as new art.
Before, only the object ids went through the filters and the guides and
slices were copied back, while new art on a locked artboard was dropped.

Session::restore_selection gives a document back a saved selection
through those filters. The dxf_import test that covers a selection made
after OK now selects a different object instead of the Replace target.
2026-12-04 15:28:47 -08:00
dotCooCoo 2d0f5f9726 DXF Import: a failed DWG Replace keeps the user's selection
Placing a DWG drawing with Replace selects the object it swaps again at
OK. When the drawing was then not placed (an error while it was read,
or Cancel), that object stayed selected and the selection the user made
since Place started was lost.

- The user's selection comes back with select.set, with its anchors and
  symbol part, when the read fails or is canceled, unless the document
  changed since OK (a selection made since then is kept).
- Cancel restores the selection of the document the drawing was placed
  in without switching documents, and not after File > Revert.
- The current layer stays current.
2026-12-04 14:45:10 -08:00
dotCooCoo f080afc4ae Pencil: the moves of one frame preview the stroke once
The canvas hands every pointer move of a frame to the freehand tools, and
each move ran a full preview: the stroke was fitted again, inserted into
the document and run through every post-edit pass, and the next move's
preview threw it away. A pen or a fast mouse delivers several moves per
frame, so drawing slowed down with both the move rate and the document
size (#4343).

- SessionTool keeps the drag samples of a pass and hands them, with the
  release when it comes in the same pass, to the new
  Session::pointer_samples. Every other tool call hands them over first,
  so the order of events does not change.
- Session::pointer_samples feeds every sample to the tool and applies
  only the last preview of each run of previews of one command. The held
  preview is applied before the release and before any other action.
- Every preview still runs during a Global Edit, with Objects on Path
  selected, with more than one object selected, and with New Art Has
  Basic Appearance off when the stroke began with a selection, since a
  preview there changes what the next sample reads. The decision is
  made again after each event that is not a drag.
2026-12-04 05:31:32 -08:00
FredApps 6f6a6d4e20 Merge branch 'main' into codex/10008-native-composite-adoption 2026-12-04 10:31:44 +01:00
yoriswind 940b869f2d Gradients: sample a color into a freeform point 2026-12-04 00:35:05 -08:00
dotCooCoo 983a7a2522 Merge main into feat/font-sheet 2026-12-03 11:02:31 -08:00
dotCooCoo c4a737f255 Merge main into feat/scripts-scriptui-palettes 2026-12-03 09:29:28 -08:00
.CooCoo 9a21dae940 Merge pull request #10636 from dotCooCoo/fix/script-image-read-once
Scripts: placing or relinking an image reads its file once
2026-12-03 07:32:03 -08:00
.CooCoo 68fcab0512 Merge pull request #10436 from dotCooCoo/fix/slider-cancel-after-failed-preview
Path sliders: Cancel ends the edit a refused preview left open
2026-12-03 07:25:26 -08:00
.CooCoo 7836fbbe1c Merge pull request #10379 from dotCooCoo/fix/gradient-stop-swatch-identity
Gradient: the stop popover keeps the swatch picked among swatches of one color
2026-12-03 07:24:27 -08:00
.CooCoo 44c6916bde Merge pull request #10077 from dotCooCoo/feat/artboard-flood-fill
Document Tools: Flood Fill Artboards adds an artboard-sized rectangle on its own layer
2026-12-03 07:17:43 -08:00
dotCooCoo 08a29802b8 Scripts: placing or relinking an image reads its file once
PlacedItem.file and PlacedItem.relink() ran file.place.info on the file
to check that it held an image, then file.place or links.relink read and
decoded it again. The image check now runs inside file.place and
links.relink while a script places or relinks an image: a file in no
image format is refused before the document changes, with "The file is
not an image", and a damaged image keeps its own error. The double read
came in with fed96731e2 (#9077).

A test counts the engine's file reads and fails with 2 reads on main.
2026-12-02 15:38:44 -08:00
dotCooCoo e1558e7e4a Merge main into feat/scripts-scriptui-palettes 2026-12-02 15:27:42 -08:00
dotCooCoo 8cdfcdbb5c Merge main into feat/font-sheet 2026-12-02 12:20:29 -08:00
dotCooCoo 930c02ce8f Merge main into feat/scripts-pageitem-transforms 2026-12-02 12:20:10 -08:00
dotCooCoo 46b0d0def6 Merge main into feat/scripts-scriptui-palettes 2026-12-02 12:08:01 -08:00
dotCooCoo 60f0cb13d5 Merge main into fix/gradient-stop-swatch-identity 2026-12-02 12:06:44 -08:00