cad-editor/src/app/commands
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven da2c600953 feat(sysvars): persist Ortho, running OSNAP and Isolate in the drawing
Ortho and the running object-snap set were app-global (settings.txt only) and
Isolate/Hide was a session-only view state, so none survived save/reopen and
none were per-drawing. Bind all three to the file like AutoCAD:

- Ortho -> header.ortho_mode ($ORTHOMODE); running OSNAP <-> header
  .object_snap_mode ($OSMODE bitmask) via a new SnapType<->bit map in settings
  (osmode_from_snaps / snaps_from_osmode, round-trip tested). The header is the
  per-drawing store, live state mirrors the active drawing: adopt header->live
  on open and tab-switch, stamp live->header on save and when leaving a tab, a
  fresh drawing inherits the current values, and SETVAR ORTHOMODE/OSMODE now
  also update the live state. settings.txt stays as the boot/new-drawing
  default; the per-file header overrides it on open.
- Isolate/Hide now set each entity's persisted invisible flag (DXF code 60,
  which acadrust round-trips in DXF and DWG) in addition to the session set;
  End Isolation clears it. The set is reseeded from invisible entities on load
  and after undo/redo, the commands are undoable and mark the tab dirty. The
  renderer already skipped invisible entities, so no render change was needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 15:45:08 +03:00
..
blocks.rs feat(alias): centralize command aliases in user-editable ocad.pgp (#286/#288) 2026-07-10 12:39:22 +03:00
dim.rs feat(alias): centralize command aliases in user-editable ocad.pgp (#286/#288) 2026-07-10 12:39:22 +03:00
display.rs feat(alias): centralize command aliases in user-editable ocad.pgp (#286/#288) 2026-07-10 12:39:22 +03:00
draw.rs feat(alias): centralize command aliases in user-editable ocad.pgp (#286/#288) 2026-07-10 12:39:22 +03:00
fileops.rs feat(alias): centralize command aliases in user-editable ocad.pgp (#286/#288) 2026-07-10 12:39:22 +03:00
inquiry.rs feat(alias): centralize command aliases in user-editable ocad.pgp (#286/#288) 2026-07-10 12:39:22 +03:00
layerprops.rs fix(properties): repaint on linetype/lineweight/layer edits (#231 class) 2026-07-01 19:14:35 +03:00
layers.rs feat(sysvars): persist Ortho, running OSNAP and Isolate in the drawing 2026-07-10 15:45:08 +03:00
mod.rs feat(alias): centralize command aliases in user-editable ocad.pgp (#286/#288) 2026-07-10 12:39:22 +03:00
styleprops.rs feat(sysvars): persist Ortho, running OSNAP and Isolate in the drawing 2026-07-10 15:45:08 +03:00
view.rs feat(alias): centralize command aliases in user-editable ocad.pgp (#286/#288) 2026-07-10 12:39:22 +03:00