Resolve the MTEXT conflicts with #3197 (jayzed80's #2952 fix) on the
shared tokenizer: Token::Unknown is now shown as typed (backslash kept,
code read as text) in plain_mtext, the layout parser and the paragraph
scan, matching main's behaviour. Drop the now-unneeded too_many_lines
expectation on parse.
* ui: omit hidden objects from grip painting and hit tests
Respect the drawing's existing visibility predicate when painting selection
grips and finding the grip under the pointer. A hidden handle restored through
another selection path must not show or activate grips.
The visibility predicate also suppresses grips for entities on off or frozen
layers, not only objects hidden with HIDEOBJECTS.
The frame regression uses ordinary model geometry and HIDEOBJECTS, with an
on-screen selected-object control.
* Grips: a hidden object takes no hot-grip stretch and no dynamic grips
Clicking a hot grip stretches every hot-grip object, and the set can still hold
an object that was hidden after it became hot (its grips are no longer painted,
but the stretch still moved it). `click_grip` now drops hidden objects from the
hot-grip set first.
Dynamic-block grips come from the selection, which Undo or another selection
source can restore with a hidden block reference in it; `dyngrips::of_selection`
now skips hidden references as ordinary grips already do.
Adds a test for each, a doc comment on the test helpers, and `cadcraft-io` as a
dev-dependency of the UI crate so the dynamic grips test can read the synthetic
dynamic-block fixture of the io tests.
* Grips: a hidden object in the selection takes no part in a grip edit
A grip edit took the whole selection as its targets. A hidden object that was back in the
selection (Undo, sssetfirst, a control call) was stretched with a visible object's grip that
shared its point, and the Move, Rotate, Scale and Mirror modes transformed it.
The grip edit now leaves out what the drawing does not show when a grip becomes hot: a hidden
object's own grip is never made hot, the object is not among the targets, and the typed GRIP
command does not find its grips. A grip edit with no grip left does not start.
* Use craft-dxf from craft-libs; remove crates/dxf
cadcraft-dxf moved to craft-libs unchanged as craft-dxf
(storytold/craft-libs#791) so VectorCraft can write DXF through the same tag
layer. CADCRAFT_MAX_DXF_TAGS still sets the tag limit.
* Pin craft-dxf to the merge of storytold/craft-libs#796
* address review: restore the dated measurement text in file-format-parity.md
The bridge picked the token by port alone and sent it to whatever the address resolved to, so a listener another account opened on ::1 with the same port received the desktop's credential. The token is now attached only when the connected peer is exactly 127.0.0.1:PORT, where the app listens. Reading the token refuses a symlink, a non-plain file and a file others can read, and the shared temporary directory is no longer a fallback location for it.
On macOS the Open and Save panels ran modally inside winit's event handler, and resizing one aborted the app (#1527). Every file dialog now goes through CadApp::pick_then / pick_then_open. On macOS, Services::start_pick shows the dialog as a sheet on the window and the answer is acted on in a later frame. The answer is bound to the drawing that asked for it. Windows and Linux are unchanged.
Fixes#1527
Co-authored-by: mocenigo <4894657+mocenigo@users.noreply.github.com>
craft-update moves from craft-libs c5a1cbfb to c7c84230, a branch that is
craft-libs main at 0a9d1f48 with storytold/craft-libs#687 and #696 merged
in. Cargo.lock changes the craft-update entry and drops zopfli from zip.
The check result window now shows whenever the updater's status is not
idle, not only after Help > Check for Updates, and never over the startup
prompt. At the first start after an update it reports that the update
installed or why it failed. Restart to Update calls
Updater::restart_to_update. The install helper starts when the app exits
and drops the updater, so a canceled close keeps the update ready.
Without a path the screenshot was written into a private temp directory, and std::env::temp_dir panics on wasm32 (no file system), which stopped the whole web app: the page's call never got a reply and nothing after it ran. On wasm the PNG now comes back inline (pngBase64, width, height, bytes), as ui.render's does. Native builds are unchanged.
The web shell queues the page's calls as control requests (the channel the desktop control server uses) and answers them on the next frame. PendingReply gains try_reply, so a transport that cannot block can poll it, and cancels a request the app has not started when it is dropped, as a timed-out wait does: the page was told the call failed, so the app skips it. The API is installed in every mode; opening, saving, the file name and the unsaved flag stay with the host messages.
egui_system_font_provider, egui_demo_lib and egui_inspection were patched to the egui fork
with the rest of its family (#2119), but no crate here depends on them: Cargo.lock lists
them as [[patch.unused]] and cargo warns on every build. A vendored offline build (Nix's
importCargoLock) refuses an unused git patch, so the flakes in #794 and #1814 can't build
main. Reported by @mbolling on #1814.
The transports, the message types and the origin checks come from the shared crate (storytold/craft-libs#420); CADCraft keeps the engine delivery hook, the open size limit and the upload inbox.
The MCP render tool and ui.render, in the app and headless, always drew
on the dark canvas with no plot style, so a PNG placed on a page needed
the SVG export instead.
They now take `background` ("dark", the default; "white", "paper" or
"#rrggbb") and `plot_style` (a built-in plot style table such as
monochrome.ctb or grayscale.ctb, or one the drawing holds). Colour 7 is
drawn black on a light background and white on a dark one, as on a plot.
An unknown value is refused with what is accepted. Both copies of
ui.render read the options through one function in the engine
(render_look). The render tool's description also says it returns an
image block, not text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): About credits tables fit without side-scrolling and their columns resize
The Contributors table and the Models table were egui Grids inside a
two-way scroll area: they opened wider than the dialog, so they scrolled
sideways, and Company and Model sat almost touching. Both are now
egui_extras tables. Each column opens at the width of its header and widest
cell, the spare width goes to the text columns (Name; Company and Model),
and every column edge can be dragged. Widening a column grows the table
like a spreadsheet, and only then does it scroll sideways; the header stays
put while the rows scroll. Counts and dates are right-aligned and every
cell is vertically centred.
The sorted column stays highlighted and its direction shows on the
toolbar's sort-order button, so headers no longer reserve room for an
arrow. The opening widths come from fit_widths, a pure function with unit
tests that a fitted table fills its room exactly and that only the text
columns give way when room is short.
The About dialog opens 820 points wide, so every column fits at its natural width.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Let every credits column be dragged, and refit changed tables
The last column was egui's remainder column, which has no drag handle, so
it could only be resized from the edge before it. It is now an ordinary
column with its own handle.
A table keeps its column widths, so switching to a longer name left the
Name column at its old width and clipped the text. The table now goes
back to the opening fit whenever that fit changes: a longer widest cell
or a resized window. Dragged widths are dropped at that point.
fit_widths could overflow the room when one column hit the minimum,
because the other columns did not take up its share. Columns now give
way in proportion to their width above the minimum.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Refit credits tables on what they measure, not the fitted widths
Comparing the fitted widths missed the case it was meant for. Name is the
only growing column, so a longer name takes its extra width from the
spare room and the fit comes out the same: a dragged Name width stayed,
clipping the longer name.
It could also drop dragged widths by accident. The fit comes from the
available width inside the scroll area, which scrolling can nudge, so
scrolling a widened table could reset it.
The table now compares the natural widths and the clip rect's width,
which scrolling does not move.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>