Skip to content

Commit

Permalink
[Fixed] Missing data in components added from PCBs
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Nov 16, 2023
1 parent 7774db1 commit ff03417
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kibot/kiplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ def load_sch():
def create_component_from_footprint(m, ref):
c = SchematicComponentV6()
c.f_ref = c.ref = ref
c.name = m.GetValue()
c.sheet_path_h = c.lib = ''
c.project = GS.sch_basename
# Basic fields
# Reference
f = SchematicField()
Expand All @@ -288,7 +291,7 @@ def create_component_from_footprint(m, ref):
# Value
f = SchematicField()
f.name = 'Value'
f.value = m.GetValue()
f.value = c.name
f.number = 1
c.add_field(f)
# Footprint
Expand All @@ -313,6 +316,7 @@ def create_component_from_footprint(m, ref):
f.visible(False)
c.add_field(f)
c._solve_fields(None)
c.split_ref()
return c


Expand Down

0 comments on commit ff03417

Please sign in to comment.