diff options
| author | Lex Neva <github.com@lexneva.name> | 2021-08-07 10:58:02 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2021-08-07 10:58:02 -0400 |
| commit | 12ef0c84aa732623b210fdce1a7b8301aa435217 (patch) | |
| tree | 4c7fbb33c4840be4bf8d8fecfd7fe481d0e56895 /lib/extensions/layer_commands.py | |
| parent | c1e6558f7852def419adfbeb087b2194e6030a2c (diff) | |
| parent | d6e20fae8a03ac162ae0c863fff06b5bd8b77902 (diff) | |
Merge remote-tracking branch 'origin/main' into kaalleen/satin-patterns
Diffstat (limited to 'lib/extensions/layer_commands.py')
| -rw-r--r-- | lib/extensions/layer_commands.py | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/lib/extensions/layer_commands.py b/lib/extensions/layer_commands.py index 2494e820..26f01fad 100644 --- a/lib/extensions/layer_commands.py +++ b/lib/extensions/layer_commands.py @@ -4,12 +4,9 @@ # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. import inkex -from lxml import etree -from ..commands import LAYER_COMMANDS, ensure_symbol, get_command_description +from ..commands import LAYER_COMMANDS, add_layer_commands from ..i18n import _ -from ..svg import get_correction_transform -from ..svg.tags import INKSCAPE_LABEL, SVG_USE_TAG, XLINK_HREF from .commands import CommandsExtension @@ -23,19 +20,4 @@ class LayerCommands(CommandsExtension): inkex.errormsg(_("Please choose one or more commands to add.")) return - correction_transform = get_correction_transform(self.svg.get_current_layer(), child=True) - - for i, command in enumerate(commands): - ensure_symbol(self.document, command) - - etree.SubElement(self.svg.get_current_layer(), SVG_USE_TAG, - { - "id": self.uniqueId("use"), - INKSCAPE_LABEL: _("Ink/Stitch Command") + ": %s" % get_command_description(command), - XLINK_HREF: "#inkstitch_%s" % command, - "height": "100%", - "width": "100%", - "x": str(i * 20), - "y": "-10", - "transform": correction_transform - }) + add_layer_commands(self.svg.get_current_layer(), commands) |
