summaryrefslogtreecommitdiff
path: root/gerbonara
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara')
-rw-r--r--gerbonara/cad/protoboard.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerbonara/cad/protoboard.py b/gerbonara/cad/protoboard.py
index af61085..bc759f8 100644
--- a/gerbonara/cad/protoboard.py
+++ b/gerbonara/cad/protoboard.py
@@ -74,9 +74,9 @@ class PropLayout:
widths.append(x_max - x_min)
heights.append(y_max - y_min)
if self.direction == 'h':
- return sum(widths), max(heights)
+ return sum(widths), max(heights, default=0)
else:
- return max(widths), sum(heights)
+ return max(widths, default=0), sum(heights)
def layout_2d(self, bbox, unit=MM):
(x, y), (w, h) = bbox