In the Flatpak build the save panel answers with a path in the document
portal (/run/user/<uid>/doc/<id>/<name>), and the portal puts only that
name into the folder picked. When the app changed the answer before
writing, for example `poster` to `poster.pdf` or `Untitled-1.vectorcraft`
to `Untitled-1.pdf` with PDF picked, the write succeeded inside the portal,
the status bar said the file was saved, and no file appeared in the folder.
Export, Save As, Save a Copy and the read-only Save retry now open the save
panel again with the changed name suggested, and the status bar says why.
The answer to that panel is written. A read-only retry that changes format
still asks for the new format's options.
Fixes#10868
Paste on Windows never read the enhanced metafile that CAD and office
apps put on the clipboard as vector art: windows_formats had no entry for
EMF, so the app pasted their bitmap instead, or nothing. The Windows
clipboard holds an EMF as a handle (CF_ENHMETAFILE, which Windows also
makes from CF_METAFILEPICT), so the app now copies its records with
GetEnhMetaFileBits, at most 64 MiB, and pastes them through
clipboard.importEmf.
A .dxf, .dwg or HP-GL plot file copied in a file manager did not paste,
because file_flavour had no flavour for them, though Open and Place read
all three. They now paste as image/vnd.dxf, image/vnd.dwg and
application/vnd.hp-hpgl through the new command clipboard.importCad
{dataBase64, format: dxf|dwg|hpgl, center?}, read as document.open reads
the file. A file pastes this way only when its bytes are the format, so
a chart script named .plt is not taken for a plot.
Fixes#10819.
A smoothed polygon mesh drops its spline-frame vertices before building the
grid, so only groups 73 and 74 describe the vertices that are left. When those
counts did not fit, the importer fell back to the frame's M and N, and a frame
whose vertex count happened to match laid the surface vertices out on the
wrong grid. The mesh is now left out with the missing-vertices warning.
docs/mcp.md now says that a UI-only tool returns the window-required
message in a headless session, including one the closed-app choice
started, and returns the window lookup, launch or authentication error
otherwise.
Plain `vectorcraft-cli mcp` checked for the window with `has_ui`, which
turns a failed launch or handshake into "no window". A UI-only tool
(`inspect_ui`, `type_text`, `answer_dialog`, `open_panel`, a window
screenshot) then said it needs the open window, even when the window was
open and the connection to it was what failed. `Backend::ui` now returns
that error, and the UI-only tools report it.
Polyface mesh and polygon mesh POLYLINEs were dropped with a warning.
They now come in as one path each, their height dropped:
- A polyface mesh draws each face's visible edges. A face with every
edge visible is a closed outline; an edge whose vertex number is
negative is left out. A face that names a vertex the mesh doesn't
have is left out with a warning.
- A polygon mesh draws its M and N lines, closed when the mesh is
closed in M or N. A smoothed mesh draws its surface vertices
(groups 73 and 74), not its frame. A mesh whose vertices don't fill
its grid is left out with a warning.
- 3DFACE leaves out the edges its group 70 hides, as polyface faces do.
Docs: docs/mcp.md (DXF import).
The canvas markers stay as they are when the caller's read folders do
not cover the same files as the document's, or when a script command
makes the call. The links.marked help text, docs/mcp.md and the
progress-doc line now say both, in place of "read folders differ".
The URL and Note fields now take their edit target from
panels::selection_target instead of a copy of its key in attributes.rs.
The shared target also holds the selected symbol part, so selecting a
part of a symbol instance drops an unfinished URL or note: attributes.set
does not edit a selected part.
A value typed into a corner radius field and not yet entered stayed in
the field when the selection moved to other corners with the same
radius, so Enter applied the old expression to the new corners: "3+"
typed with one rectangle selected and "1" Enter after selecting another
gave the second rectangle 4 pt.
Each corner radius field now passes NumberField::edit_target a key for
what it edits: the document, its File › Revert and Undo or Redo counts,
the selected objects in id order and the corners the field sets. The
key covers the Properties panel's Corner Radius, the Control bar's
Corner Radius, the Corners pop-up's Radius, a live shape's Corner
Radius and the per-corner fields of a live rectangle. The same objects
selected in another order keep the value. Rounding a Direct-Selected
corner leaves the unrounded path as it was, so a scrub that rounds it
keeps going. The per-corner fields keep a value while only the
Direct-Selected anchors change, since they set a fixed corner of each
selected live rectangle.
A live rectangle's, polygon's or star's corners keep their order and are
keyed by index and corner count, so the value stays while the shape
moves, rotates or scales, and goes when a polygon gains a side. A
corner of any other path is keyed by its index and by its subpath:
where that subpath starts, whether it is closed, and its anchors and
handles measured from its first anchor. Moving the path, or reversing
or moving another subpath, keeps the value; reversing, rotating or
scaling the corner's own subpath drops it.
PickedCorners gains these corner keys beside its command items. The
corners a live shape's Corner Radius sets, and the selected live
rectangles the per-corner fields set, are measured once per document
revision.
Rotate draws a plane for every fill and stroke, but rendered mode only
checked the top fill and the strokes before drawing the image. A
gradient fill below a solid top fill was drawn as a flat color in the
rendered image instead of falling back to shaded faces with the
warning. Extrude & Bevel and Inflate still check only the top fill and
strokes they build solids from.
When placed editable art names a font family that its file does not define
as a composite font, and the document defines a composite font of that
name, the placed type was measured in the file's font but drew in the
document's composite font after placement. The placed type now gets a free
name such as "Name 2", so it keeps the font it was laid out in. Placing the
same art again reuses that name.
- The renaming also covers the fonts a file carries for its type and the
label font of a live dimension, so they stay paired with the renamed runs.
- An installed family is not renamed.
- The installed-name check applies only to the composite fonts a
placement adds, so a definition already in the document does not stop it.
- docs/mcp.md describes the renaming under file.place.
With Show Missing Links on, a links.marked call from a caller confined to
other read folders saw a linked file outside them as missing and wrote that
answer to the markers the canvas draws, putting a missing-link badge on a
file that is there. The call now updates the markers only when its read
folders match those the document was opened with and no script gate is in
force; otherwise the caller gets its own answer.