forked from 1b-agent/opencadstudio-upstream
fix(linetype): catalog complex linetypes keep their shapes and text
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>
This commit is contained in:
1 parent
6dbdeb62e8
commit
593f7ca3e9
2 files changed
+157
-17
No files matched your search
@@ -355,6 +355,10 @@ async fn open_path_with_phase_attempt(
|
||||
recoverable: true,
|
||||
});
|
||||
}
|
||||
// Before the geometry is prepared below: completing the
|
||||
// drawing's catalog linetypes (and repairing stripped ones)
|
||||
// after it would leave the first view drawn without them.
|
||||
crate::io::linetypes::populate_document(&mut doc);
|
||||
progress2.set(crate::app::OPEN_PHASE_XREF, 6000, 0, 1);
|
||||
let t_xref = Instant::now();
|
||||
let (xref_infos, xref_dropped) = if let Some(base_dir) = path2.parent() {
|
||||
|
||||
Reference in new issue
Block a user