Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible/impracticable to undo automated filter placement in Design LTN tool #1116

Open
andrewphilipsmith opened this issue Sep 7, 2023 · 2 comments
Labels

Comments

@andrewphilipsmith
Copy link
Collaborator

How to reproduce

  • In the Design LTN tool, select a large-ish neighbourhood
  • Try automatically placing filters using the following option:

Advanced -> Automatically place modal filters -> stop the most shortcuts (bute-force)

  • Attempt to undo the placement of the filter

Expected behaviour

The user should be able to undo the filter placement with a single undo.

Actual behaviour

The user may need to select undo > 100 times in order to return to the state before automatically placing the filter.

(It seems that an edit is made and undone for each candidate filter (see

fn brute_force(app: &mut App, neighbourhood: &Neighbourhood, timer: &mut Timer) {
) (~= the number of interior roads in the neighbourhood). This can be > 100, making it impracticable for the user to undo this change later.

@dabreegster
Copy link
Collaborator

This was a problem introduced by #1085. It's possible we need to rethink the MapEdits structure with flat commands right now, and be able to batch them together. Maybe something like EditCmd::Multiple(Vec<EditCmd>) (ignoring the recursive type problem).

@dabreegster
Copy link
Collaborator

Ah, I slightly misread the issue -- a related problem is the use of the freehand filter tool. The user can introduce a bunch of new filters with one logical operation, but then has to undo filters individually (in an arbitrary order). That's another case where we'd want to logically batch edits.

@dabreegster dabreegster added the ltn label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants