Merge pull request #117 from thesamprice/fix/add-label-subsheet-fallback
fix: add_label falls back gracefully on sub-sheet schematics
This commit is contained in:
@@ -318,8 +318,9 @@ class WireManager:
|
|||||||
break
|
break
|
||||||
|
|
||||||
if sheet_instances_index is None:
|
if sheet_instances_index is None:
|
||||||
logger.error("No sheet_instances section found in schematic")
|
# Sub-sheets in hierarchical designs don't have (sheet_instances).
|
||||||
return False
|
# Fall back to appending before the final closing paren of (kicad_sch ...).
|
||||||
|
sheet_instances_index = len(sch_data)
|
||||||
|
|
||||||
# Insert label
|
# Insert label
|
||||||
sch_data.insert(sheet_instances_index, label_sexp)
|
sch_data.insert(sheet_instances_index, label_sexp)
|
||||||
|
|||||||
Reference in New Issue
Block a user