Fix duplicates in gds with multiple top-level cells

Since the different patterns we are handed might reference the same
Patterns, we have to deepcopy the entire list at once so that we
don't make multiple copies of them.
lethe/HEAD
Jan Petykiewicz 4 years ago
parent 5ba67af816
commit 64b8e4dec8

@ -90,7 +90,7 @@ def write(patterns: Pattern or List[Pattern],
disambiguate_func = disambiguate_pattern_names
if not modify_originals:
patterns = [p.deepcopy().deepunlock() for p in patterns]
patterns = [p.deepunlock() for p in copy.deepcopy(patterns)]
# Create library
lib = gdsii.library.Library(version=600,

Loading…
Cancel
Save