In Glyphs 4 (4000), if I have any GSHandle selected, layer.selectionBounds will not return the correct bounds of the selection.
The extra points are simply ignored. so the result is the same as if you haven’t selected anything.
Right. I assumed G3 returned the correct values but it doesn’t either.
When a GSHandle is selected, layer.selectionBounds used to return large finite values, but G4 now returns infinity. This causes the Show Center Lines plugin to be stuck on a error loop when selecting those extra nodes:
I just made a pull request that guards against infinity values to prevent that error.
You can support both Glyphs 3 and 4 by checking that the value is less than the large finite value. That handles Glyphs 3 as well, where a direct equals check is discouraged anyway.


