Skip to content

fix: allow deleting walls and slabs via floating action menu#180

Open
nnhhoang wants to merge 2 commits intopascalorg:mainfrom
nnhhoang:fix/delete-structures
Open

fix: allow deleting walls and slabs via floating action menu#180
nnhhoang wants to merge 2 commits intopascalorg:mainfrom
nnhhoang:fix/delete-structures

Conversation

@nnhhoang
Copy link

Summary

  • Walls and slabs were excluded from ALLOWED_TYPES in FloatingActionMenu, so no delete UI appeared when selecting them
  • Added wall and slab to the allowed types with a new DELETE_ONLY_TYPES list
  • Made onMove/onDuplicate optional in NodeActionMenu so structural elements show only the delete button
  • Move/duplicate remain available for items, doors, windows, roofs as before

Closes #156

Test plan

  • Draw a wall, select it — floating menu shows delete-only button
  • Existing behavior preserved (doors/items still show move/duplicate/delete)
  • Lint passes (bun run check — 0 issues)
  • No new type errors introduced

@kleenkanteen
Copy link

@nnhhoang you should add a vid of the full flow btw

Walls and slabs were excluded from ALLOWED_TYPES in FloatingActionMenu,
so no delete UI appeared when selecting them. Added wall/slab to the
allowed types and show only the delete button (no move/duplicate) since
they are structural elements.

Usage: switch to select mode (V), click a wall or slab, then use the
floating trash icon or press Delete/Backspace to remove it.

Closes pascalorg#156
@nnhhoang nnhhoang force-pushed the fix/delete-structures branch from ac668b1 to 1213cae Compare March 26, 2026 05:25
@nnhhoang
Copy link
Author

nnhhoang commented Mar 26, 2026

@kleenkanteen here is the flow
Select a wall or slab (V → click), then delete it using the floating trash icon or Delete key.
Ảnh màn hình 2026-03-26 lúc 15 46 36

@Aymericr
Copy link
Contributor

Thanks for the PR.
This looks fine, although the deleting action from the floating menu was intended to be click to activate and then click to delete on the canvas, similar to the sledge hammer in The Sims.

moving.while.holding.tool.-.sledgehammer.mp4

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.

No way to delete structures? (walls, slabs?)

3 participants