diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2025-04-19 07:11:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-19 07:11:57 +0200 |
| commit | b009a5355e7ceea477ea55eacba2149a9398b37e (patch) | |
| tree | 3061490b8f44638676b82bcc1adbbe11191c94c2 /lib/stitches | |
| parent | 54bc44daaf62ed1e65d7eb48e5cd245c252c14c2 (diff) | |
duplicate-consistant autoroute element selection (#3638)
Diffstat (limited to 'lib/stitches')
| -rw-r--r-- | lib/stitches/auto_run.py | 3 | ||||
| -rw-r--r-- | lib/stitches/auto_satin.py | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/stitches/auto_run.py b/lib/stitches/auto_run.py index 760d0393..85c575bf 100644 --- a/lib/stitches/auto_run.py +++ b/lib/stitches/auto_run.py @@ -273,14 +273,17 @@ def create_element(path, position, direction, element): if direction == "autorun": label = _("AutoRun %d") % index dasharray = 'none' + path_type = 'autorun-top' else: label = _("AutoRun Underpath %d") % index dasharray = '2 1.1' + path_type = 'autorun-underpath' node = inkex.PathElement() node.set("id", generate_unique_id(element.node, el_id)) node.set(INKSCAPE_LABEL, label) node.set("d", path) + node.set("inkstitch:path_type", path_type) node.set("style", element.node.style) node.style["fill"] = 'none' node.style["stroke-dasharray"] = dasharray diff --git a/lib/stitches/auto_satin.py b/lib/stitches/auto_satin.py index 22d489db..67f5de34 100644 --- a/lib/stitches/auto_satin.py +++ b/lib/stitches/auto_satin.py @@ -428,6 +428,8 @@ def _route_single_satin(elements, starting_point, keep_originals): stroke_width = convert_stroke_width(satin) run_element.node.style['stroke-width'] = stroke_width + run_element.node.set('inkstitch:path_type', 'satin-underpath') + parent.insert(index, run_element.node) if not keep_originals: remove_original_elements([satin], True) @@ -598,6 +600,7 @@ def name_elements(new_elements, preserve_order): element.node.set("id", generate_unique_id(element.node, "autosatin")) else: element.node.set("id", generate_unique_id(element.node, "autosatinrun")) + element.node.set("inkstitch:path_type", 'satin-underpath') if not (preserve_order and INKSCAPE_LABEL in element.node.attrib): if isinstance(element, SatinColumn): |
