summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-10-17 03:12:11 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-10-17 03:12:11 (GMT)
commit89151f999c6f9ee9d8f19af3c34206bba14b799c (patch)
tree78ce29e36241f266f27cc0ac03bdac2a00e9fa04 /gui
parentda73cf1541ee7c0f67e80f5089bc60992417b634 (diff)
downloadeeshow-89151f999c6f9ee9d8f19af3c34206bba14b799c.zip
eeshow-89151f999c6f9ee9d8f19af3c34206bba14b799c.tar.gz
eeshow-89151f999c6f9ee9d8f19af3c34206bba14b799c.tar.bz2
gui/comp.c (get_bbox): filter by unit (for multi-unit parts)
Diffstat (limited to 'gui')
-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);