fix: harden the issue-fix wave after full adversarial review

Five reviewers (PDF, snap, commands, otrack/help, printing) covered the
eight issue-fix commits; every blocker and major is fixed here.

Printing (#1261 follow-up):
- printto params now quote the printer name and pad the empty driver/
  port slots handlers substitute ("Microsoft Print to PDF" was split
  into three arguments and the job silently lost).
- Level-2 enumeration also merges when the level-4 list omits the
  configured default, not only when it is empty; a level-2 error no
  longer discards the default-printer merge.
- The printer list loads in a background task instead of blocking the
  UI thread (level-2 queries can wait out RPC timeouts).
- CTB registration: collisions keep the existing file but now say so,
  and only container-parsed tables are registered (the permissive
  zlib heuristic stays session-only so junk cannot persist).

Snapping (#1030/#1319 follow-up):
- Edge-wire key_vertices gain NaN separators: junctions between
  unrelated mesh edges no longer fabricate phantom midpoints.
- The wire cap counts segments (not separator points) and decimates
  instead of dropping, so dense meshes keep partial endpoint coverage
  instead of losing snap entirely.
- f64 endpoint recovery is a one-shot per-wire map instead of an
  O(points x geoms) rescan on every mouse move.

Commands (#1082 class): the same typed-value-on-web bug also hit
CYLINDER/BOX/WEDGE/CONE/PYRAMID heights, HELIX final height (wrong
value, not just dropped), and SWEEP reference/new lengths — all now
commit as text at exactly those steps, each pinned by a regression
test that fails without the override (plus the missing native-route
twin for EXTRUDE).

PDF (#702 follow-up): heavy CTB pens bypass the Form XObject (their
half-width exceeds the /BBox SDF margin and was flat-chopped), CTM
scale entries round to 4 significant digits (0.01 quantized small
text by ~1%), degenerate quads skip emission, the atlas snapshot is
taken once per export instead of per text entity, and the rounding
comments no longer conflate page points with glyph-plane units.

OTRACK (#1313 follow-up): the guide's polar quantization diverges
from the snapper's drafting-gated polar during window-corner drags —
documented; an orphaned grid-step doc block is reunited with its
function.
This commit is contained in:
Afonsop committed 2026-09-17 18:42:15 +01:00
1 parent 5ea4294d3d
commit d135b15ab6
18 files changed
+1326 -138

No files matched your search

+11 -2
View File
@@ -3260,6 +3260,11 @@ pub enum Message {
/// Web never constructs it — printing opens the PDF preview instead.
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
PrintResult(Result<String, String>),
/// Printers enumerated off the UI thread for the Plot dialog's dropdown;
/// the dialog opens immediately and the list lands whenever the spooler
/// query finishes. Web never constructs it — it has no system printers.
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
PrintersListed(Vec<String>),
/// Open the full Plot / Print dialog (seeds state from the layout).
PlotDialogOpen,
/// An edit inside the Plot / Print dialog.
@@ -3290,8 +3295,12 @@ pub enum Message {
/// Open file dialog to load a CTB/STB plot style table.
PlotStyleLoad,
/// Callback when the user picks (or cancels) a CTB/STB file.
/// `Ok(None)` = cancelled; `Err` = the picked file failed to parse.
PlotStyleLoaded(Result<Option<crate::io::plot_style::PlotStyleTable>, String>),
/// `Ok(None)` = cancelled; `Err` = the picked file failed to parse. The
/// table carries an optional non-fatal note for the command line (e.g.
/// registration kept an already-registered table of the same name).
PlotStyleLoaded(
Result<Option<(crate::io::plot_style::PlotStyleTable, Option<String>)>, String>,
),
/// Clear the active plot style table.
PlotStyleClear,
/// Open/close the Plot Style panel.