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

Fix simplification errors that result in warnings after removing panes #41

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Jan 2, 2024

  • When removing a tile, it needs to be removed from its parents list of children
  • When simplifying a tree that collapses the root, use the correct tile_id post-simplification.

This results in a few API changes:

  • remove_recursively is moved from the Tiles container to the Tree container.
  • simplify_tile_id is replaced by simplify_children_of_tile to avoid ambiguity where simplification would cause that tile to be simplified out of existence.

@jleibs jleibs added invalid This doesn't seem right bug Something isn't working and removed invalid This doesn't seem right labels Jan 2, 2024
@jleibs jleibs changed the title When removing a tile, remove it from the parent child list Fix simplification errors that result in warnings after removing panes Jan 2, 2024
src/tiles.rs Outdated Show resolved Hide resolved
src/tree.rs Outdated Show resolved Hide resolved
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
@jleibs jleibs merged commit b6e4fd4 into main Jan 3, 2024
6 of 8 checks passed
@jleibs jleibs deleted the jleibs/clear_from_parent_on_remove branch January 3, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants