feat: stop looping the bom once the part inserted #95

This commit is contained in:
Benny Megidish
2023-10-08 20:38:50 +03:00
committed by GitHub
parent bad1d2d1a3
commit 2b8c898d22
+3 -2
View File
@@ -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: