summaryrefslogtreecommitdiff
path: root/lib/commands.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2021-06-12 11:33:59 +0200
committerGitHub <noreply@github.com>2021-06-12 11:33:59 +0200
commit777ac818f6f32ca870d08f32c3938dff671233ea (patch)
tree6d1717e52de60ebedbcaf3de38fc365be4181c0f /lib/commands.py
parent9b15c04e36949e6509c227d17183a85ba058e835 (diff)
stacking commands (#1243)
Diffstat (limited to 'lib/commands.py')
-rw-r--r--lib/commands.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/commands.py b/lib/commands.py
index da07df0a..f2ab8c3e 100644
--- a/lib/commands.py
+++ b/lib/commands.py
@@ -287,14 +287,15 @@ def ensure_symbol(document, command):
def add_group(document, node, command):
- return etree.SubElement(
- node.getparent(),
+ group = etree.Element(
SVG_GROUP_TAG,
{
"id": generate_unique_id(document, "command_group"),
INKSCAPE_LABEL: _("Ink/Stitch Command") + ": %s" % get_command_description(command),
"transform": get_correction_transform(node)
})
+ node.getparent().insert(node.getparent().index(node) + 1, group)
+ return group
def add_connector(document, symbol, element):