Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle grid layout with
Tree::move_tile_to_container()
(#45)
Follow-up to: - #44 The grid layout needs a special treatment because it can have holes, contrary to other containers. When dragging a tile away from a grid, it leaves behind it a hole. As a result, if the tile is dropped in the same grid, it there is no need to account for an insertion index shift. However, if the tiles are reordered in a separate, linear representation of the grid (such as the Rerun blueprint tree), the expectation is that the grid is reordered and thus the insertion index must be shifted in case the tile is moved inside the same grid. This PR introduce a flag in `move_tile_to_container()` to select between these behaviors. In general: - when drag-and-dropping from a 2D representation of the grid, set reflow_grid = false - when drag-and-dropping from a 1D representation of the grid, set reflow_grid = true
- Loading branch information