path: root/kicad/delta.c
diff options
authorWerner Almesberger <>2016-08-30 03:28:45 -0300
committerWerner Almesberger <>2016-08-30 03:28:45 -0300
commite3aea192ee483678648797b091c9e863bbf7d9c8 (patch)
tree51a1b9895e503da0123830c571985568648d00a0 /kicad/delta.c
parentccb43979d970bc7ee26a4128e1e5b3882008ec63 (diff)
kicad/delta.c (sheet_eq): make recursing optional; don't recurse in index
In the index, we don't want to have pages marked because there's a page underneath that has changed. After all, that other page is being shown in the index as well. However, in all other cases we still want to recurse.
Diffstat (limited to 'kicad/delta.c')
1 files changed, 3 insertions, 3 deletions
diff --git a/kicad/delta.c b/kicad/delta.c
index a09a014..c45212f 100644
--- a/kicad/delta.c
+++ b/kicad/delta.c
@@ -319,14 +319,14 @@ static bool obj_eq(const struct sch_obj *a, const struct sch_obj *b,
return 1;
if (a->u.sheet.error != b->u.sheet.error)
return 0;
- return sheet_eq(a->u.sheet.sheet, b->u.sheet.sheet);
+ return sheet_eq(a->u.sheet.sheet, b->u.sheet.sheet, 1);
BUG("invalid type %d", a->type);
-bool sheet_eq(const struct sheet *a, const struct sheet *b)
+bool sheet_eq(const struct sheet *a, const struct sheet *b, bool recurse)
const struct sch_obj *obj_a, *obj_b;
@@ -345,7 +345,7 @@ bool sheet_eq(const struct sheet *a, const struct sheet *b)
obj_a = a->objs;
obj_b = b->objs;
while (obj_a && obj_b) {
- if (!obj_eq(obj_a, obj_b, 1))
+ if (!obj_eq(obj_a, obj_b, recurse))
return 0;
obj_a = obj_a->next;
obj_b = obj_b->next;