fdfe5a813e
Also improves large distance handling.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8846
(cherry picked from commit 68655540eb)