Reference ranges of two elements no longer represented as ranges.
Examples: "R1-R2" is now "R1 R2", "R1-R3" remains unchanged.
This commit is contained in:
parent
352b38ab93
commit
de0390f954
|
|
@ -26,6 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Errors and warnings from KiAuto now are printed as errors and warnings.
|
||||
- Schematic dependencies are sorted in the generated Makefiles.
|
||||
- Makefile variables KIBOT, DEBUG and LOGFILE can be defined from outside.
|
||||
- Reference ranges of two elements no longer represented as ranges.
|
||||
Examples: "R1-R2" is now "R1 R2", "R1-R3" remains unchanged.
|
||||
|
||||
### Fixed
|
||||
- Problem when using E/DRC filters and the output dir didn't exist.
|
||||
|
|
|
|||
|
|
@ -137,12 +137,17 @@ class Joiner:
|
|||
if c != 0:
|
||||
refstr += sep
|
||||
S, E = Q
|
||||
refstr += S[0]+str(S[1])
|
||||
if S == E:
|
||||
refstr += "%s%d" % S
|
||||
# Only one element
|
||||
c += 1
|
||||
elif S[1]+1 == E[1]:
|
||||
# Two elements, I think this is better than pretending this is a real range
|
||||
refstr += sep+E[0]+str(E[1])
|
||||
c += 2
|
||||
else:
|
||||
# Do we have space?
|
||||
refstr += "%s%d%s%s%d" % (S[0], S[1], dash, E[0], E[1])
|
||||
# A range
|
||||
refstr += dash+E[0]+str(E[1])
|
||||
c += 2
|
||||
return refstr
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue