forked from 1b-agent/opencadstudio-upstream
The loader added every catalog linetype to the drawing with its [shape] and ["text"] elements stripped, and the renderer reads the drawing's own definition first — so BATTING, ZIGZAG, PLANT, POINT1/2, DRAINAGE, FENCELINE, TRACKS, GAS_LINE, HOT_WATER_SUPPLY drew as plain dashes (a near-solid line), and a saved file carried no shapes either. - populate_document_from_source now stores each shape / text on the element it follows, with a shape-file STYLE (empty name, one per file) and the named text style; values keep their written decimals. - One table maps shape names to numbers per shape file: the standard ltypeshp 130–134, the bundled catalog's own beyond them. The renderer resolves stored numbers through it instead of a hard-coded list that ignored which file a number belonged to. - A drawing's copy stripped to exactly the catalog's dashes (as this loader saved them) gets its shapes and text back on open. - Opening completes the linetypes before the geometry is prepared, so the first view already draws them. Fixes #665 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>