summaryrefslogtreecommitdiff
path: root/gerbonara/cam.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-03-31 16:31:44 +0200
committerjaseg <git@jaseg.de>2023-04-10 23:57:15 +0200
commit02954407703430dcefba0b165360d201fe8e205c (patch)
treee103a7df869064f8d1d4b36b4311f4aee393f12a /gerbonara/cam.py
parent800827b2c575c31f1449ce9d690d158c7bb2f497 (diff)
downloadgerbonara-02954407703430dcefba0b165360d201fe8e205c.tar.gz
gerbonara-02954407703430dcefba0b165360d201fe8e205c.tar.bz2
gerbonara-02954407703430dcefba0b165360d201fe8e205c.zip
Improve layer stack handling
Diffstat (limited to 'gerbonara/cam.py')
-rw-r--r--gerbonara/cam.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gerbonara/cam.py b/gerbonara/cam.py
index 9819087..14d4c61 100644
--- a/gerbonara/cam.py
+++ b/gerbonara/cam.py
@@ -444,5 +444,8 @@ class LazyCamFile:
def save(self, filename, *args, **kwargs):
""" Copy this Gerber file to the new path. """
- shutil.copy(self.original_path, filename)
+ if 'instance' in self.__dict__: # instance has been loaded, and might have been modified
+ self.instance.save(filename, *args, **kwargs)
+ else:
+ shutil.copy(self.original_path, filename)