From 2b8c898d2271dc8f3dc0f3aed3c4e6149a980d3b Mon Sep 17 00:00:00 2001 From: Benny Megidish Date: Sun, 8 Oct 2023 20:38:50 +0300 Subject: [PATCH] feat: stop looping the bom once the part inserted #95 --- plugins/process.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/process.py b/plugins/process.py index cde8e4f..9b1e13f 100644 --- a/plugins/process.py +++ b/plugins/process.py @@ -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: