Fixed SCH "Entry" load

This commit is contained in:
SET 2020-08-12 09:43:19 -03:00
parent 652b38f04d
commit 148b4887ce
1 changed files with 6 additions and 1 deletions

View File

@ -807,11 +807,16 @@ class SchematicWire(object):
raise SchFileError('Malformed wire', line, _sch_line_number) raise SchFileError('Malformed wire', line, _sch_line_number)
wire = SchematicText() wire = SchematicText()
if res[0] == 'Wire': if res[0] == 'Wire':
# Wire Wire Line
# Wire Bus Line
# Wire Notes Line
if res[2] != 'Line' or res[1] not in SchematicWire.WIRES: if res[2] != 'Line' or res[1] not in SchematicWire.WIRES:
raise SchFileError('Malformed wire', line, _sch_line_number) raise SchFileError('Malformed wire', line, _sch_line_number)
wire.type = SchematicWire.WIRES[res[1]] wire.type = SchematicWire.WIRES[res[1]]
else: # Entry else: # Entry
if res[2] != 'Bus' or res[1] not in SchematicWire.ENTRIES: # Entry Wire Line
# Entry Bus Bus
if (res[2] != 'Bus' and res[2] != 'Line') or res[1] not in SchematicWire.ENTRIES:
raise SchFileError('Malformed entry', line, _sch_line_number) raise SchFileError('Malformed entry', line, _sch_line_number)
wire.type = SchematicWire.ENTRIES[res[1]] wire.type = SchematicWire.ENTRIES[res[1]]
line = _get_line(f) line = _get_line(f)