Skip to content

Commit ffc6b19

Browse files
SebastianGrauyaqwsx
authored andcommitted
Prepend library names in AnnotationReader.getDefault() to be compatible with KiCAD 7.0
Since KiCAD 7.0 library names from plugins installed via the Plugin and Content Manager (PCM) get prepended with `PCM_`. In order to make tab annotations work with KiCAD 7.0 the library names in `AnnotationReader.getDefault()` need to be also prepended with that string.
1 parent 46d4fcb commit ffc6b19

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

kikit/annotations.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,15 @@ def convertToAnnotation(self, footprint: pcbnew.FOOTPRINT) -> List[KiKitAnnotati
104104

105105
@staticmethod
106106
def getDefault() -> AnnotationReader:
107+
"""
108+
Return AnnotationReader object initialized with default annotations registered
109+
"""
107110
r = AnnotationReader()
108111
r.registerTab("kikit", "Tab")
109112
r.registerBoard("kikit", "Board")
113+
114+
# Since KiCAD 7.0 the plugins installed via the Plugin and Content Manager get prepended with `PCM_`
115+
r.registerTab("PCM_kikit", "Tab")
116+
r.registerBoard("PCM_kikit", "Board")
110117
return r
111118

0 commit comments

Comments
 (0)