From 9ca61b50b6beb385b5b80c4bd5eae055b1609e7d Mon Sep 17 00:00:00 2001 From: Frank Severinsen Date: Tue, 5 May 2020 01:25:35 +0200 Subject: [PATCH] Check reference designator type when comparing comp example: prevents a 10K NTC resistor from getting grouped with a 10K SMD resistor --- eeschema/plugins/python_scripts/kicad_netlist_reader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eeschema/plugins/python_scripts/kicad_netlist_reader.py b/eeschema/plugins/python_scripts/kicad_netlist_reader.py index bf0ed22cb3..e9f83e13f4 100644 --- a/eeschema/plugins/python_scripts/kicad_netlist_reader.py +++ b/eeschema/plugins/python_scripts/kicad_netlist_reader.py @@ -21,6 +21,7 @@ import sys import xml.sax as sax import re import pdb +import string #--------------------------------------------------------------------- @@ -335,7 +336,8 @@ class comp(): result = False if self.getValue() == other.getValue(): if self.getFootprint() == other.getFootprint(): - result = True + if self.getRef().rstrip(string.digits) == other.getRef().rstrip(string.digits): + result = True return result def setLibPart(self, part):