summaryrefslogtreecommitdiff
path: root/kicad
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-28 03:59:38 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-28 03:59:38 -0300
commitf1f3f789852c4d0125d427f9d7ffb2ba97fcadbb (patch)
tree73a9f7653e02e69f58fe904e62ce3e22527b08e3 /kicad
parente2aca3cb29d8ffe426aa34b60336282a5f4754a6 (diff)
downloadeeshow-f1f3f789852c4d0125d427f9d7ffb2ba97fcadbb.tar.gz
eeshow-f1f3f789852c4d0125d427f9d7ffb2ba97fcadbb.tar.bz2
eeshow-f1f3f789852c4d0125d427f9d7ffb2ba97fcadbb.zip
kicad/sch-parse.c (parse_line): also accept "Text GLabel" without text style
Diffstat (limited to 'kicad')
-rw-r--r--kicad/sch-parse.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/kicad/sch-parse.c b/kicad/sch-parse.c
index 0049241..3525690 100644
--- a/kicad/sch-parse.c
+++ b/kicad/sch-parse.c
@@ -438,14 +438,19 @@ static bool parse_line(const struct file *file, void *user, const char *line)
free(italic);
return 1;
}
- if (sscanf(line, "Text GLabel %d %d %d %d %ms %ms %d",
+ n = sscanf(line, "Text GLabel %d %d %d %d %ms %ms %d",
&obj->x, &obj->y, &text->dir, &text->dim, &s,
- &italic, &bold) == 7) {
+ &italic, &bold);
+ if (n == 5 || n == 7) {
ctx->state = sch_text;
obj->u.text.fn = dwg_glabel;
obj->u.text.shape = decode_shape(s);
- obj->u.text.style = decode_style(italic, bold);
- free(italic);
+ if (n == 5) {
+ obj->u.text.style = text_normal;
+ } else {
+ obj->u.text.style = decode_style(italic, bold);
+ free(italic);
+ }
return 1;
}
if (sscanf(line, "Text HLabel %d %d %d %d %ms %ms %d",