diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2021-07-25 07:24:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-25 07:24:34 +0200 |
| commit | 2f35a4a192eb6aa3b68b715da6c1ba984084e0e5 (patch) | |
| tree | 7a28d41ff83730e3bf53ee65b315783497503cec /lib/extensions/layer_commands.py | |
| parent | 36815f977d7236311e9b345c33fbc74390766385 (diff) | |
Fix Style Issues (#1154)
Co-authored-by: Lex Neva <github.com@lexneva.name>
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) |
