Repository navigation
Closed
Labels
area:sketchsketcher and constraint solverin progresssomeone is working on it (see comments)needs-triageno priority yet; a maintainer sorts it with /triage
Description
Requested by Cam
In the Drawing workspace, pressing Delete does nothing on the sheet. A selected view or dimension stays. When a view goes, the views projected or cut from it (a section view, for example) go too, but the confirm doesn't say which ones.
What happens
- Open a drawing with a base view, a projected view and a section view cut from the base view, and a dimension.
- Click the dimension and press Delete. Nothing happens.
- Click the base view and press Delete. Nothing happens.
- The view's card has a Delete button. Its confirm says "Delete this view and its dependent views and annotations?", but it doesn't list the views that will go with it.
Screenshots of the sheet, before and after, come with the PR.
Expected
- Delete (and Backspace) on a selected dimension deletes it, in one undo step.
- Delete on a selected view with no views that depend on it deletes it and its dimensions at once, with the Undo toast the card's Delete already shows.
- Delete on a view that other views depend on opens an "Are you sure?" window that lists those views by name. Confirm deletes them all in one undo step, and Cancel deletes nothing.
- The card's Delete button uses the same rule and the same window.
Cause
- In Drawing, the key handler blocks every Design shortcut (
toolbar.rs, the gate that Drawing workspace: Ctrl+Z and Ctrl+Y undo and redo the open drawing (#18938) #18939 opens for Ctrl+Z and Ctrl+Y only). So theKey::Delete | Key::Backspacearm (toolbar.rsline 2800), which deletes the model selection, is never reached. The sheet page has no Delete key of its own. - The sheet page selects only views (
drawing_sheet_page/view_tools.rs,state.selected). A dimension can't be selected. selection.deletealready deletes drawing objects ({type: drawing, drawing, object}). Withdry_runit reports what would go, and withoutcontents: deleteit refuses a view with dependants and names them (crates/engine/src/cmd/delete.rsline 28). The confirm (view_tools.rs,confirm_delete) doesn't use the dry run, so it can't list them.
Proposed fix
With a drawing open, Delete and Backspace delete the sheet page's selection through selection.delete. A dry run first finds the dependants. If there are any, the kit Confirm lists them, and the card's Delete button uses the same path. A click selects a dimension as it selects a view. Nothing changes in the engine or crates/geom.
Part of #4894.
Metadata
Metadata
Assignees
Labels
area:sketchsketcher and constraint solverin progresssomeone is working on it (see comments)needs-triageno priority yet; a maintainer sorts it with /triage
Activity
github-actions commentedon Nov 18, 2026
Claimed by @CamWight through #19016. The claim lapses after 14 days without pushes.
CamWight commentedon Nov 20, 2026
Done on main. The details and thanks are on #19016.