summaryrefslogtreecommitdiff
path: root/lib/commands.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2019-07-27 15:48:50 -0400
committerGitHub <noreply@github.com>2019-07-27 15:48:50 -0400
commit833a8a971d8a73fbc42468a89d083e37a0bd6d8d (patch)
tree4c38fd49d7cf813a2df1d07dbd32160d0e36373f /lib/commands.py
parent03af8b37276870efd97f7049ced006f6e01ef935 (diff)
parent7ce4387ff6f8d4302ff374921d0b93b7b491b9a5 (diff)
Merge pull request #487 from inkstitch/no_import_jumps
remove additional jump stitches on import
Diffstat (limited to 'lib/commands.py')
-rw-r--r--lib/commands.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/commands.py b/lib/commands.py
index 8e35d7ee..c735185f 100644
--- a/lib/commands.py
+++ b/lib/commands.py
@@ -289,6 +289,10 @@ def add_connector(document, symbol, element):
start_pos = (symbol.get('x'), symbol.get('y'))
end_pos = element.shape.centroid
+ # Make sure the element's XML node has an id so that we can reference it.
+ if element.node.get('id') is None:
+ element.node.set('id', generate_unique_id(document, "object"))
+
path = inkex.etree.Element(SVG_PATH_TAG,
{
"id": generate_unique_id(document, "connector"),