Skip to content

Boundary list: tick obstacles and delete them together - #236

Merged
renatorgr merged 1 commit into
pulverizadorfrom
feat/delete-ticked-obstacles
Nov 14, 2026
Merged

renatorgr merged 1 commit into
pulverizadorfrom
feat/delete-ticked-obstacles

Conversation

@renatorgr

Copy link
Copy Markdown
Owner

Requested by Renato · project thread

What changed

The boundary list can delete many obstacles at once. Redrawing a field's trees meant deleting over 40 obstacles one row and one confirmation at a time.

  • Each obstacle row has a box in front of it. The box in the title row ticks every obstacle, or none when all are ticked.
  • Ticked obstacles are outlined red on the map. A bar under the list shows "N obstacles ticked", with Untick all and Delete ticked. The trash button deletes the ticked ones too. One confirmation for all of them: "Delete the N ticked obstacles? The outer boundary stays. This cannot be undone."
  • The outer boundary has no box and is never deleted this way.
  • Ticks are kept by list row, so every tick goes when the list changes (a row added or deleted, an obstacle resized or made round, another field). A choice or the Hard flag changed keeps them.
  • Host: boundary.deleteObstacles|rows:i,j,k -> MainViewModel.RemoteDeleteObstacles. It deletes nothing when its list has another length than the one ticked, or when a row is not an obstacle, so a row number never names another obstacle.
  • Panel 42 px wider for the box column; the other columns keep their width.

Nothing else changes: one row selected and deleted with the trash button (nothing ticked) works as before. Fork only.

Related issue

None. Asked in the project thread (40+ trees to redraw).

Pre-submit checklist

  • dotnet build succeeds with no errors
  • dotnet test Tests/AgOpenWeb.ViewModels.Tests/: 775 passed, 6 new in DeleteTickedObstaclesTests (ticked ones go and the rest stay in order; all obstacles leave the outer; the outer among the rows, another list length, a row past the end and no row delete nothing; a row ticked twice is one obstacle)
  • Tools/i18n-extract.py --check, Tools/license-headers.py --check
  • Tested on: Linux (.NET 10), headless app + Chromium at 1280x800, field "Quinta Torta" (57 obstacles): 9 ticked, 1 unticked, trash -> "Delete the 8 ticked obstacles?" -> 58 rows to 50; tick all 49 -> header full; tick all again -> 0; a circle added clears a tick

Screenshots

Picture in the project thread (aow-screenshots/delete-ticked-obstacles.png): 8 ticked, the bar under the list, the confirmation.


Generated by Claude Code

A tester redrawing a field's trees had over 40 obstacles to delete one
row and one confirmation at a time. Each obstacle row now has a box in
front of it, and the title row a box that ticks every obstacle (or
none). Ticked obstacles are outlined red on the map; a bar under the
list counts them, with Untick all and Delete ticked, and the trash
button deletes them too, all after one confirmation.

The outer boundary has no box and is never deleted this way. Ticks are
kept by list row, so they all go when the list changes (a row added or
deleted, an obstacle resized, another field); the host deletes nothing
when its list has another length than the one ticked, or a row is not
an obstacle (boundary.deleteObstacles|rows:i,j,k,
MainViewModel.RemoteDeleteObstacles). Fork only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VKEBDFEFL88R13LC2YPU4t
@renatorgr renatorgr self-assigned this Nov 14, 2026
@renatorgr
renatorgr marked this pull request as ready for review November 14, 2026 19:25
@renatorgr
renatorgr merged commit f011c2d into pulverizador Nov 14, 2026
7 checks passed
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