adjustSize(): add support for edge chars

This commit is contained in:
Florian Festi 2019-09-01 15:26:31 +02:00
parent df331cd1f3
commit 52484b0d55
1 changed files with 5 additions and 1 deletions

View File

@ -522,6 +522,10 @@ class Boxes:
self.addPart(parts.Parts(self))
def adjustSize(self, l, e1=True, e2=True):
# Char to edge object
e1 = self.edges.get(e1, e1)
e2 = self.edges.get(e2, e2)
try:
total = sum(l)
walls = (len(l) - 1) * self.thickness
@ -535,7 +539,7 @@ class Boxes:
walls += self.thickness
if isinstance(e2, edges.BaseEdge):
walls += e2.startwidth + e2.margin()
walls += e2.startwidth() + e2.margin()
elif e2:
walls += self.thickness