Clear empty containers after tile drag-and-drop #5044
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This PR triggers a egui_tile tree simplification of the viewport upon tile drag-and-drop to work around the spurious empty containers typically left behind after a move. This happens only when the additive workflow feature flag is set (otherwise, the on-going simplification takes care of that).
This simplification is agressive, and may delete (empty) containers that the user created on purpose, which is why we run it only on drag-and-drop. This is not ideal, but that's the best I can come up with until we stop using egui_tiles as application-level data structure. Still a net usability win.
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io