cad-editor/src/app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 50281c6a05 fix(ui): per-tab Layer/Color/Linetype/Lineweight defaults
The Home-ribbon Color / Linetype / Lineweight chips live on the
global `self.ribbon` and were never re-seeded from the active tab's
header, so opening a fresh file, creating a new tab, or switching
between tabs kept showing whatever the prior tab had picked. Layer
worked already because `self.tabs[i].active_layer` is per-tab.

Two halves of the fix:

1. When the user picks a new value from the ribbon with no entity
   selection, persist it into that tab's `document.header`
   (CLAYER + handle, CECOLOR, CELTYPE + handle, CELWEIGHT) and
   mark the tab dirty. Switching back later reads the saved value
   back out.

2. After every event that changes the active tab — `FileOpened`,
   `TabNew`, `TabSwitch`, `TabClose` (including the
   close-last-and-reset path) and `UnsavedDialogDiscard` — call
   `sync_ribbon_from_selection()` so the chips track the new
   tab's defaults (or its current selection).

Closes #21

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 21:00:13 +03:00
..
cmd_result.rs perf(scene): multi-resolution mesh LOD (Phase 3.4) 2026-05-15 23:30:13 +03:00
commands.rs feat(app): surface round-trip HeaderVariables via DWGPROPS + USERI/USERR 2026-05-20 05:48:07 +03:00
document.rs cargo fmt 2026-05-12 10:36:15 +03:00
helpers.rs chore: drop dead scene/IO helpers + simplify XATTACH command state 2026-05-16 00:10:20 +03:00
history.rs cargo fmt 2026-05-12 10:36:15 +03:00
layers.rs cargo fmt 2026-05-12 10:36:15 +03:00
mod.rs feat: in-app update notice — checks GitHub releases on startup 2026-05-16 19:55:57 +03:00
properties.rs feat: honour LUNITS / LUPREC unit formatting + INSUNITS scaling on insert 2026-05-20 05:43:55 +03:00
update.rs fix(ui): per-tab Layer/Color/Linetype/Lineweight defaults 2026-05-20 21:00:13 +03:00
view.rs perf(app): only subscribe to window::frames while animating 2026-05-19 13:42:03 +03:00