Handle 85 statements that omit one value

This commit is contained in:
Garret Fick 2016-06-04 14:57:21 +08:00
parent ea97d9d037
commit fca36a29b9

View file

@ -856,6 +856,11 @@ class SlotStmt(ExcellonStatement):
(x_start_coord, y_start_coord) = SlotStmt.parse_sub_coords(sub_coords[0], settings)
(x_end_coord, y_end_coord) = SlotStmt.parse_sub_coords(sub_coords[1], settings)
# Some files seem to specify only one of the coordinates
if x_end_coord == None:
x_end_coord = x_start_coord
if y_end_coord == None:
y_end_coord = y_start_coord
c = cls(x_start_coord, y_start_coord, x_end_coord, y_end_coord, **kwargs)
c.units = settings.units