feat(annotative): add/remove drawing annotation scales

The drawing's annotation-scale list (ACAD_SCALELIST) is now editable, so the
set of scales offered by the status-bar scale pill can be grown or trimmed:

- Scene::add_scale / remove_scale create or drop a Scale object and its
  SCALELIST dictionary entry (creating the SCALELIST dictionary, and
  registering it in the root, for drawings that carry none).
- SCALELISTEDIT gains ADD <ratio> / DELETE <name> alongside the existing
  listing (e.g. `SCALELISTEDIT ADD 1:50`).
- The scale popup (model space) grows a delete affordance on each non-active
  scale and a "+ Add scale..." row that primes the command line. The current
  annotation scale is protected from deletion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-13 10:18:05 +03:00
commit b1eba180eb
5 changed files with 233 additions and 20 deletions

View file

@ -1455,6 +1455,10 @@ pub enum Message {
ToggleScalePopup,
/// Close the scale picker popup.
CloseScalePopup,
/// Delete a named annotation scale from the drawing's ACAD_SCALELIST.
ScaleListDelete(String),
/// Prime the command line to add a new annotation scale.
ScaleListAddPrompt,
/// Toggle the leftmost hamburger's Model/layout list dropdown.
ToggleLayoutList,
/// Close the Model/layout list dropdown.