diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2025-02-05 16:47:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-05 16:47:03 +0100 |
| commit | 76c3a6681a417a009bd423f2afdbc7895a1a8775 (patch) | |
| tree | 97cecb3712355ec9c0734276098d6ed32eb99a2c /lib | |
| parent | 1e1d14428ce0ac36d96bccf571220e8166ec070a (diff) | |
fix auto_satin transform issue (#3489)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lettering/font.py | 2 | ||||
| -rw-r--r-- | lib/stitches/utils/autoroute.py | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/lettering/font.py b/lib/lettering/font.py index 1805b0b4..0c02de84 100644 --- a/lib/lettering/font.py +++ b/lib/lettering/font.py @@ -525,7 +525,7 @@ class Font(object): satin operation. Any nested svg:g elements will be removed. """ - elements = nodes_to_elements(group.iterdescendants(SVG_PATH_TAG)) + elements = nodes_to_elements(group.iterdescendants(EMBROIDERABLE_TAGS)) elements = [element for element in elements if isinstance(element, SatinColumn) or isinstance(element, Stroke)] if elements and any(isinstance(element, SatinColumn) for element in elements): diff --git a/lib/stitches/utils/autoroute.py b/lib/stitches/utils/autoroute.py index b10ae21c..1bb1c0e2 100644 --- a/lib/stitches/utils/autoroute.py +++ b/lib/stitches/utils/autoroute.py @@ -279,12 +279,13 @@ def preserve_original_groups(elements, original_parent_nodes, transform=True): """ for element, parent in zip(elements, original_parent_nodes): - transform = '' + if parent is None: + continue + element_transform = '' if transform: - transform = get_correction_transform(parent, child=True) - if parent is not None: - parent.append(element.node) - element.node.set('transform', transform) + element_transform = get_correction_transform(parent, child=True) + parent.append(element.node) + element.node.set('transform', element_transform) def add_elements_to_group(elements, group): |
