fix(app): running OSNAP set is app-level, not per-drawing

Modern DWG (R2000+) has no file slot for OSMODE — reading a file left
the header at 0, and adopt_header_sysvars wiped the user's running snap
set on every open. Persist the set (as an $OSMODE-style bitmask) in
settings.json, save it on every snap toggle, and only let a file
override it when it actually carries a nonzero mask (R13/R14 DWG, DXF).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Fable 5 committed 2026-07-21 22:00:55 +03:00
1 parent 5ea6a9ac8e
commit ccd1086f9f
4 files changed
+29 -3

No files matched your search

+2
View File
@@ -1309,6 +1309,8 @@ impl OpenCADStudio {
);
self.snapper.enabled = modes.into_iter().collect();
self.snapper.snap_enabled = en;
// The OSNAP set is app-level (no modern-DWG file slot).
self.persist_settings_if_changed();
}
}
}