feat(select): PICKADD/PICKDRAG command-line toggles (#226)

PICKADD 0 = click/box/lasso replaces the selection (Shift toggles),
empty click clears; PICKADD 1 (default) keeps today's accumulate.
PICKDRAG 1 = press-drag spans a rectangle marquee through the box
machinery; PICKDRAG 0 (default) keeps the freeform lasso. Both persist
in settings.json. Also re-points the start-page gate test at the
start_allowed fn it moved into (#388/389 refactor left it broken).

Closes #226

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-22 21:35:37 +03:00
commit 0c578b03f3
7 changed files with 250 additions and 17 deletions

View file

@ -293,6 +293,12 @@ pub(super) struct OpenCADStudio {
/// Selection cycling: clicking where objects overlap opens a list box
/// to pick which one; the pick is added to the current selection.
selection_cycling: bool,
/// PICKADD (#226): true (default) = clicks accumulate; false = OS-style
/// replace-on-click with Shift toggling.
pick_add: bool,
/// PICKDRAG (#226): false (default) = press-drag lassoes; true =
/// press-drag draws a rectangle marquee.
pick_drag_rect: bool,
/// Frame-budget HUD (Phase 5.3): overlays the last wire re-tessellation
/// cost on the active viewport. Toggled by the `PERF` command.
perf_hud: bool,
@ -2277,6 +2283,8 @@ impl OpenCADStudio {
clean_screen: false,
quick_properties: false,
selection_cycling: false,
pick_add: true,
pick_drag_rect: false,
perf_hud: false,
cycle_candidates: None,
pre_cmd_tangent: None,