summaryrefslogtreecommitdiff
path: root/kicad/delta.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-20 20:57:54 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-20 20:57:54 -0300
commit0a4d441b9d2961d9dcec79522b9a1289ed2ece63 (patch)
tree64e092d25f7df989ef1c14d2d6df60482092cd64 /kicad/delta.c
parentca924a3926e2f726fc41b442a1b7b8235262d8a3 (diff)
downloadeeshow-0a4d441b9d2961d9dcec79522b9a1289ed2ece63.tar.gz
eeshow-0a4d441b9d2961d9dcec79522b9a1289ed2ece63.tar.bz2
eeshow-0a4d441b9d2961d9dcec79522b9a1289ed2ece63.zip
eeshow/kicad/delta.c (comp_eq_objs): we never properly compared lib_obj_poly
Diffstat (limited to 'kicad/delta.c')
-rw-r--r--kicad/delta.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kicad/delta.c b/kicad/delta.c
index 6a4a2cd..e86c821 100644
--- a/kicad/delta.c
+++ b/kicad/delta.c
@@ -38,6 +38,8 @@
static bool comp_eq_objs(const struct lib_obj *a, const struct lib_obj *b)
{
+ int i;
+
/*
* @@@ over-simplify a little. We don't search to find objects that
* have merely been reordered.
@@ -49,6 +51,16 @@ static bool comp_eq_objs(const struct lib_obj *a, const struct lib_obj *b)
return 0;
switch (a->type) {
case lib_obj_poly:
+ if (a->u.poly.thick != b->u.poly.thick &&
+ a->u.poly.fill != b->u.poly.fill)
+ return 0;
+ if (a->u.poly.points != b->u.poly.points)
+ return 0;
+ for (i = 0; i != a->u.poly.points; i++)
+ if (a->u.poly.x[i] != b->u.poly.x[i] ||
+ a->u.poly.y[i] != b->u.poly.y[i])
+ return 0;
+ return 1;
case lib_obj_rect:
return a->u.rect.sx == b->u.rect.sx &&
a->u.rect.ex == a->u.rect.ey &&