summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/comp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/comp.c b/gui/comp.c
index 48b9421..c2297bb 100644
--- a/gui/comp.c
+++ b/gui/comp.c
@@ -73,7 +73,9 @@ static struct dwg_bbox get_bbox(const struct sch_obj *sch_obj)
struct dwg_bbox bbox;
const int *m = sch_obj->u.comp.m;
- for (obj = sch_obj->u.comp.comp->objs; obj; obj = obj->next)
+ for (obj = sch_obj->u.comp.comp->objs; obj; obj = obj->next) {
+ if (obj->unit && sch_obj->u.comp.unit != obj->unit)
+ continue;
switch (obj->type) {
case lib_obj_poly:
for (i = 0; i != obj->u.poly.points; i++)
@@ -98,6 +100,7 @@ static struct dwg_bbox get_bbox(const struct sch_obj *sch_obj)
default:
break;
}
+ }
bbox.x = mx(xa, ya, m);
bbox.y = my(xa, ya, m);