[repetition / others] copies should get their own repetitions

This commit is contained in:
Jan Petykiewicz 2026-03-31 22:15:21 -07:00
commit 8d50f497f1
9 changed files with 32 additions and 0 deletions

View file

@ -187,6 +187,7 @@ class Arc(PositionableImpl, Shape):
new._offset = self._offset.copy()
new._radii = self._radii.copy()
new._angles = self._angles.copy()
new._repetition = copy.deepcopy(self._repetition, memo)
new._annotations = copy.deepcopy(self._annotations)
return new

View file

@ -68,6 +68,7 @@ class Circle(PositionableImpl, Shape):
memo = {} if memo is None else memo
new = copy.copy(self)
new._offset = self._offset.copy()
new._repetition = copy.deepcopy(self._repetition, memo)
new._annotations = copy.deepcopy(self._annotations)
return new

View file

@ -117,6 +117,7 @@ class Ellipse(PositionableImpl, Shape):
new = copy.copy(self)
new._offset = self._offset.copy()
new._radii = self._radii.copy()
new._repetition = copy.deepcopy(self._repetition, memo)
new._annotations = copy.deepcopy(self._annotations)
return new

View file

@ -235,6 +235,7 @@ class Path(Shape):
new._vertices = self._vertices.copy()
new._cap = copy.deepcopy(self._cap, memo)
new._cap_extensions = copy.deepcopy(self._cap_extensions, memo)
new._repetition = copy.deepcopy(self._repetition, memo)
new._annotations = copy.deepcopy(self._annotations)
return new

View file

@ -124,6 +124,7 @@ class PolyCollection(Shape):
new = copy.copy(self)
new._vertex_lists = self._vertex_lists.copy()
new._vertex_offsets = self._vertex_offsets.copy()
new._repetition = copy.deepcopy(self._repetition, memo)
new._annotations = copy.deepcopy(self._annotations)
return new

View file

@ -135,6 +135,7 @@ class Polygon(Shape):
memo = {} if memo is None else memo
new = copy.copy(self)
new._vertices = self._vertices.copy()
new._repetition = copy.deepcopy(self._repetition, memo)
new._annotations = copy.deepcopy(self._annotations)
return new

View file

@ -98,6 +98,7 @@ class Text(PositionableImpl, RotatableImpl, Shape):
memo = {} if memo is None else memo
new = copy.copy(self)
new._offset = self._offset.copy()
new._repetition = copy.deepcopy(self._repetition, memo)
new._annotations = copy.deepcopy(self._annotations)
return new