summaryrefslogtreecommitdiff
path: root/kicad/pl-render.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-25 11:43:10 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-25 11:43:10 -0300
commit673aade18a3e47118754bd2abc2b3479a5f4f39b (patch)
treed4d21c293be8255e1bdf7f468bce01a0e071c2d9 /kicad/pl-render.c
parent06fd6964e9a3773fba73d760326bb9f561c611ba (diff)
downloadeeshow-673aade18a3e47118754bd2abc2b3479a5f4f39b.tar.gz
eeshow-673aade18a3e47118754bd2abc2b3479a5f4f39b.tar.bz2
eeshow-673aade18a3e47118754bd2abc2b3479a5f4f39b.zip
option -L to suppress page layout; non-interactive diff always implies -L
This means that we can now do things like eeshow 6a9f71:neo900.pro neo900_SS_5.sch -- \ diff -s 2 -o diff.png neo900.pro neo900_SS_5.sch
Diffstat (limited to 'kicad/pl-render.c')
-rw-r--r--kicad/pl-render.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kicad/pl-render.c b/kicad/pl-render.c
index 961a51d..62652e3 100644
--- a/kicad/pl-render.c
+++ b/kicad/pl-render.c
@@ -28,6 +28,14 @@
/*
+ * For uses where we take libraries from a .pro but don't want the page layout,
+ * too. This is especially important in non-interactive diff mode.
+ */
+
+bool suppress_page_layout = 0;
+
+
+/*
* Eeschema works in mil
* Page layouts are in mm
*/
@@ -233,6 +241,8 @@ void pl_render(struct pl_ctx *pl, struct gfx *gfx, const struct sheet *sheets,
const struct pl_obj *obj;
int i;
+ if (suppress_page_layout)
+ return;
for (obj = pl->objs; obj; obj = obj->next)
for (i = 0; i != obj->repeat; i++)
render_obj(pl, obj, gfx, i, sheets, sheet);