Skip to content

Make a type-safe distincton between Text and Properties

This is PCB_FIELD and PCB_TEXT in the KiCad code, or fp_text and property in the s-expr format. Both are very similar, but the property field has a name, and the text field can have a locked item (in PCB files, but not in footprints).

This allows a hacked special case to be removed from the s-expr output code. It also means it's impossible to produce a invalid Text or Property type (of course you can still typo the property name, so the common preset properties are included as constants too).

Then, use the new types everywhere (this i the bulk of the changes by line, but the important changes are in KicadModTree). There is no change to the output file content, so the tests don't need updating.

Merge request reports