Grid Arrange swaps around elements seemingly at random

Summary:

Grid arrange, ideally should arrange the elements in a top-down, left to right arrangement, but seems to swap around some elements seemingly at random, but more likely some invisible criteria.

Steps to reproduce:

  • open Inkscape
  • open the attached demo file
  • select all objects
  • Open Grid arrange tab in Align and Distribute dialogue, choosing 4 rows and 3 columns

What happened?

Yellow objects are swapped with blue objects in the grid.

What should have happened?

All objects should be sorted in a top-down, left-to-right way relative to eachother.

Sample attachments:

grid_arrange_test.svg

Version info

Inkscape 1.2-alpha (56a5acc, 2022-02-22)