fix(linetype): an opened drawing keeps exactly its own linetypes (#1826)

Opening a drawing added all 50 catalog linetypes to it, so PURGE found
and removed them again after every save and reopen. Opening now only
repairs the catalog linetypes a drawing already has. The linetype
pickers (layers, properties, ribbon, attribute editor, layer states)
offer the missing catalog ones after the drawing's own, and the one
picked, or named in LINETYPE SET, is loaded on first use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-16 01:27:50 +03:00
1 parent c499ce97d4
commit 9a567d4f44
7 files changed
+85 -5

No files matched your search

+5 -4
View File
@@ -450,10 +450,11 @@ 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);
// Before the geometry is prepared below: repairing the
// drawing's stripped catalog linetypes after it would leave
// the first view drawn without their shapes. None is added:
// the drawing keeps exactly its own linetypes (#1826).
crate::io::linetypes::repair_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() {