Skip to content

feat(editor): Ctrl+A selects every layer so Delete clears the canvas - #61

Merged
tobi merged 1 commit into
tobi:mainfrom
jondkinney:feat/select-all-delete
Aug 21, 2026
Merged

feat(editor): Ctrl+A selects every layer so Delete clears the canvas#61
tobi merged 1 commit into
tobi:mainfrom
jondkinney:feat/select-all-delete

Conversation

@jondkinney

Copy link
Copy Markdown
Contributor

The Select phase already treats Ctrl+A as "select everything", so the edit phase does the same now, filling the multi-selection that's already there. Delete clears the canvas, group move and group bounds work as they do for a marquee, and clicking empty canvas drops the group. Clearing also restarts counter numbering, which the same undo puts back.

While I was in there: a group selection outlines each member now, not just the union, so you can see what's in the group rather than only its extent. The union survives as the group's extent, drawn fainter behind.

That turned out to fix flat arrows and lines too. Their bounds have zero height, so isEmpty() called them nothing and they were dropped from the extent and drew no outline, despite being selected and about to be deleted. Both changes apply to the marquee selection, which had the same blind spot.

runSelectAllDeleteSmoke (exit 101): Delete with nothing selected does nothing, a click drops the group, Ctrl+A draws a visible indicator, Ctrl+A then Delete clears four layers as one undo step, and numbering restarts at 1.

The Select phase already treats Ctrl+A as "select everything"; the edit
phase now does the same, filling the existing multi-selection so Delete,
group move and the group bounds all work as they already do for a
marquee selection. Clicking empty canvas drops the group, as it does for
any other multi-selection.

Emptying the canvas also restarts marker numbering, which the same undo
restores.

A group selection now outlines each member, not only the union:
selecting everything used to draw one faint box with no way to tell what
was in it. The union stays as the group's extent, drawn fainter behind
the members. This also fixes flat arrows and lines, whose bounds have
zero height, isEmpty() reported them as nothing, so they were dropped
from the group's extent and drew no outline at all despite being
selected and deletable. Both apply to the existing marquee selection
too.

Smoke: Delete with nothing selected as a no-op, a click dropping the
group, Ctrl+A drawing a visible indicator, Ctrl+A + Delete clearing four
layers as one undo step, and marker numbering restarting at 1.
@tobi
tobi force-pushed the feat/select-all-delete branch from d5c9409 to 63b57ee Compare August 21, 2026 23:20
@tobi
tobi merged commit 3a5f34a into tobi:main Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants