Deleting a saved profile kept only the stored ids, so a profile saved after
the last move was missing from the order passed to set_profile_order and the
default order stayed stored. Delete now builds the whole list as it shows and
stores it only when it differs from the default.
The visual bounds of a stroke with arrowheads added a square around each
end point, as wide as the head's reach. With the arrowhead's align set to
"Tip on the end point", the head lies back along the path, so the
selection box reached past the tip by the head's whole length, leaving
empty room in front of the arrow. The bounds now take the box of each
head's outline from the same geometry the canvas paints, so the box ends
at the tip. The arrowhead geometry moves from vectorcraft-effects to
vectorcraft-doc so that the bounds code can use it; vectorcraft-effects
re-exports the same items.
The fade outside the artboards filled each of its pieces on its own, and
each faded out along the edges it shares with the next, so thin lighter
lines ran from the artboard's corners to the edges of the canvas. The
pieces are now filled as one unfeathered mesh (Draw::data_fill_tiled).
Fixes#10221Fixes#10225
Co-authored-by: FredApps <[email protected]>
Rows of the Profile drop-down below Uniform can be dragged to a new
place, and stroke.widthProfile.move {name, to} does the same from a
script. Uniform stays first. The order is kept with the preferences
(widthProfileOrder) and is stored only while it differs from the
default one.
- move takes a profile's id or its label, and refuses Uniform, an
unknown name and a `to` past the last row.
- Moving a profile to the place it already has changes nothing.
- A deleted saved profile leaves the order, so one saved later under
the same name goes to the end of the list.
- Reset Profiles also puts the built-ins back in their first order,
and is enabled when only the order changed.
Ported from the reordering part of #10920.
Co-authored-by: erolkarino <[email protected]>
FreeBSD CI runs `cargo test --workspace`, which runs a crate's tests as
threads of one process; Linux CI runs nextest, one process per test. Four
vectorcraft-engine tests failed only in the shared process:
- Events plug-ins are installed in the process-wide registry, so every
installed one reacts to every session's changes and spends handlers of
each session's frame budget (MAX_FRAME_HANDLERS, 4). With other tests'
plug-ins installed at the same time, the plug-in a test counts on was
left for a later frame and its handler never ran.
a_plugin_installed_before_the_delivery_gets_no_earlier_events,
a_save_reaches_the_plugin_when_its_document_closes_first and
background_installs_during_a_drag_record_the_settled_baseline failed
this way. The tests that install events plug-ins now hold a test lock
(hold_event_plugins) while their session lives; sessions on one thread
share it.
- a_stale_placed_item_is_not_a_relative_object and
a_stale_placed_item_is_refused_as_the_relative_object_of_move used the
same fixture folder name, and each test empties its folder first, so
one deleted the other's a.png. The second one now uses its own folder.
`cargo test -p vectorcraft-engine --lib` on Linux reproduces all of them
before this change.
File > Open refuses an RTF file that ends inside a group as damaged
instead of opening the text read before the end; File > Place still
places that text. Binary data and bytes after the document's closing
brace are skipped, as the reader skips them.
Text Import Options for a file File > Open asks about now waits while
any dialog is open, as Missing Fonts does, so the two never show at
once.
The File > Open filter test uses the extensions and formats this build
reads, so it holds where no DWG decoder is built in.
Every craft-libs rev moves from 4f3e34d0dd, the head of craft-libs#5489, to craft-libs main.
The egui and winit revs are the ones that craft-libs rev pins, unchanged.
- Opacity fields (Control bar, Color Wheel, Gradient) show the stored fraction times 100 again.
craft-libs#5466 makes the number field step on from a value such as 50.999999 %, so
panels::shown_percent is removed.
- The Blend Options Ramp and Shift sliders, the Image Trace rows and the Divider field use
SliderField::edit_target (craft-libs#5024) in place of the id-salt workarounds. A value typed
for one object and not yet committed is still dropped when another is selected.
- CDR import: craft-libs now reads bitmaps as their own object kind. They are not placed; the
warnings name them with the other objects not read, and a PowerClip frame that clips only a
bitmap is named as a frame that opened empty.
`document.rasterEffectsSettings` read `"१e2"` and `"१e+2"` as 100 ppi:
`ascii_digits` treats `e` and `+` as the end of a number, so each side
could use its own digit set. The resolution now goes through
`vectorcraft_doc::ascii_digits_one_number`, which requires one digit set
for the whole value. `"१e२"` still reads as 100, and `"1e२"`, `"१e2"`
and `"१e+2"` are refused.
The clip-outline check behind `pathItems.removeAll()` measured each
subpath by its signed area. The loops of a figure eight turn opposite
ways and cancel, so the check treated the outline as enclosing nothing,
although both fill rules fill it. A subpath whose signed area is within
roundoff of zero is now measured by the area it fills under nonzero.
A subpath whose points all lie on one line still encloses nothing.
A .txt, .rtf, .docx or .doc file that starts with a PDF header (%PDF-
and a version such as 1.7) or an Affinity signature opens as that
format again, as it did before File > Open read text documents, and
File > Open asks no Text Import Options for it. A plain text note that
only starts with "%PDF" or "<svg" still opens as text.
Docs: docs/mcp.md (open_file), open_file's description.
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).
document.rasterEffectsSettings' text resolution ("300 ppi") and
ScreenSize::parse ("2x", "100w", "144ppi") read their numbers with
str::parse and an ASCII-only check, so "३०० ppi" and "२x" were refused
while number fields read them. Both now convert digits with
vectorcraft_doc::ascii_digits, now public, before their own grammar and
range checks; one number mixing digit sets is still refused.