forked from 1b-agent/opencadstudio-upstream
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>