The groundwork here is thanks to kunda1. Fixes: lp:1831510 * https://bugs.launchpad.net/kicad/+bug/1831510