fix undo for snap_regions_to_grid