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-03-31 16:31:44 +0200
commit0ae72f315998fc22cace3a6dcb5472720f58b743 (patch)
tree19f0920f7163e6254029ff28552e5ae4efea4c57 /gerbonara/cam.py
parent84ec7b26e69b41e4af8d6790757370bf7b52ba57 (diff)
downloadgerbonara-0ae72f315998fc22cace3a6dcb5472720f58b743.tar.gz
gerbonara-0ae72f315998fc22cace3a6dcb5472720f58b743.tar.bz2
gerbonara-0ae72f315998fc22cace3a6dcb5472720f58b743.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)