diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-11-23 16:02:16 -0200 |
---|---|---|
committer | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-11-23 16:04:25 -0200 |
commit | 2e2b4e49c3182cc7385f12d760222ecb57cc1356 (patch) | |
tree | 75be12f922c74b7fe9f78aca7a966c202a5d4e86 /gerber/gerber_statements.py | |
parent | ba82d60cb8a886a82d4c4199473bb1189efc6419 (diff) | |
download | gerbonara-2e2b4e49c3182cc7385f12d760222ecb57cc1356.tar.gz gerbonara-2e2b4e49c3182cc7385f12d760222ecb57cc1356.tar.bz2 gerbonara-2e2b4e49c3182cc7385f12d760222ecb57cc1356.zip |
Fix AMParamStmt to_gerber to write changes back.
AMParamStmt was not calling to_gerber on each of its primitives
on his own to_gerber method. That way primitives that changes after reading,
such as when you call to_inch/to_metric was failing because it was
writing only the original macro back.
Diffstat (limited to 'gerber/gerber_statements.py')
-rw-r--r-- | gerber/gerber_statements.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gerber/gerber_statements.py b/gerber/gerber_statements.py index fd1e629..9931acf 100644 --- a/gerber/gerber_statements.py +++ b/gerber/gerber_statements.py @@ -402,7 +402,7 @@ class AMParamStmt(ParamStmt): primitive.to_metric() def to_gerber(self, settings=None): - return '%AM{0}*{1}*%'.format(self.name, self.macro) + return '%AM{0}*{1}%'.format(self.name, "".join([primitive.to_gerber() for primitive in self.primitives])) def __str__(self): return '<Aperture Macro %s: %s>' % (self.name, self.macro) |