Fixes https://gitlab.com/kicad/code/kicad/-/issues/8243
It is cleaner to just extend the class with these functions rather than having the separate functions.