Rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023 (Also includes a bug-fix for highlighting collisions with edge-cut items.) (cherry picked from commit bfbda978b8)
bfbda978b8