A value such as 1,000 mm+1 mm read the comma as a decimal point and gave
2 mm, because only a value that was one number was checked for a thousands
comma. Each number of a sum is now checked on its own, so 1,000 mm+1 mm,
+1,000 and 2*1,000 are refused in the number fields and in
addon.units.convert, and 100.5 mm-0,5 still reads as 100 mm.
Object › Plug-ins › Unit Converter › Unit Converter Panel opens a panel
with one number field per unit of Preferences › Units › East Asian Type
(pt, picas, in, mm, cm, px, ft & in, m, yd, ft, Q, Ha). A length typed in
any field, with units and arithmetic as every number field reads them,
updates the others as it is typed; text that does not read leaves them as
they were. From Selection reads the selection's width and height as the
Transform panel measures them, and Width or Height picks which one the
fields show; the size read is dropped when the document, its selection,
Use Preview Bounds or Measure Type by Glyph Bounds changes. Apply sets
that side through object.setBounds as the Transform panel's W or H field
does (its reference point, Constrain Width and Height Proportions and
Transform Object Only, Pattern Only or Both), as one undo step, and adds
none when the size is already that length. Each field's copy button
copies its value, with its unit when Copy with Units is on, and is named
with its unit for screen readers.
- addon.units.convert {value, unit?} gives a length in every unit, and
addon.units.selectionSize {} gives the selection's width and height the
same way. Neither changes the document. convert reads at most 1024
bytes and 128 + - * / signs.
- The decimal comma rule of the number fields moves from ui-egui to
vectorcraft_doc::decimal_point, so the command reads "0,5 mm" as the
fields do.
- The Transform panel's pattern switches are built by
with_pattern_switches, which run_transform and Apply share.
Closes#5528, as proposed by @ruchirguitar.
This reverts commit bada8e1710. #7638 merged with its gate failing: besides six unformatted
files, render and trace don't compile against craft-libs e2dc681 (u64::from(usize) in
render/src/paint.rs, a private craft-libs function, and a call with one argument too many in
trace/src/opaque.rs), so main's CI fails. The tree is that of 0adbdce6cb, whose CI passed.
A trace handed in for imageTrace.make or imageTrace.makeAndExpand was
matched by its object, image, pixels and settings alone, so a trace made
in one document could stand in for the command in another open document
with the same image and settings. The trace's inputs now carry the
document's uid: TraceRun::current is false in any other document, and the
commands there drop the trace handed in and trace their own image, as one
undo step.
Test: a_trace_run_applies_only_in_its_own_document.
Document::symbol_art_bounds measured a symbol's art without the
document, so an instance of another symbol in that art counted as the
20 x 20 square. It now measures the art through SymbolBoxes, so a nested
instance takes its own symbol's art, and an inline graphic of the outer
symbol is sized by it and follows it when that symbol changes.
- The inline resolve order also follows the instances that size a
symbol's art, so a symbol is measured after the type in the art of
the symbols it holds is laid out again.
- A symbol whose art reaches itself through an instance and an inline
graphic is an empty slot. Only instances that the measurement uses
count, so one a clipping path hides adds no dependency.
- A missing symbol, a symbol without art, a symbol that holds an
instance of itself, and nesting 32 deep still measure as the square.
- SymbolBoxes finds symbols through a name index built once, and the
inline resolve pass and inline_art_bounds share one index, instead
of scanning the symbol list for each lookup.