Sort by x then y for grids, plus resetting any saved grid (needs done for origin pins)