feat: stop looping the bom once the part inserted #95
This commit is contained in:
+3
-2
@@ -227,12 +227,13 @@ class ProcessManager:
|
||||
same_footprint = component['Footprint'] == self._normalize_footprint_name(footprint_name)
|
||||
same_value = component['Value'].upper() == footprint.GetValue().upper()
|
||||
same_lcsc = component['LCSC Part #'] == self._get_mpn_from_footprint(footprint)
|
||||
under_limit = component['Quantity'] < bomRowLimit
|
||||
|
||||
if same_footprint and same_value and same_lcsc and component['Quantity'] < bomRowLimit:
|
||||
if same_footprint and same_value and same_lcsc and under_limit:
|
||||
component['Designator'] += ", " + "{}{}{}".format(footprint.GetReference(), "" if unique_id == "" else "_", unique_id)
|
||||
component['Quantity'] += 1
|
||||
insert = False
|
||||
# break ?
|
||||
break
|
||||
|
||||
# add component to BOM
|
||||
if insert:
|
||||
|
||||
Reference in New Issue
Block a user