diff options
Diffstat (limited to 'lib/extensions/layer_commands.py')
| -rw-r--r-- | lib/extensions/layer_commands.py | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/lib/extensions/layer_commands.py b/lib/extensions/layer_commands.py index 576af044..dbafc39f 100644 --- a/lib/extensions/layer_commands.py +++ b/lib/extensions/layer_commands.py @@ -1,11 +1,9 @@ -import os -import sys import inkex from .commands import CommandsExtension from ..commands import LAYER_COMMANDS, get_command_description from ..i18n import _ -from ..svg.tags import * +from ..svg.tags import SVG_USE_TAG, INKSCAPE_LABEL, XLINK_HREF from ..svg import get_correction_transform @@ -35,16 +33,14 @@ class LayerCommands(CommandsExtension): for i, command in enumerate(commands): self.ensure_symbol(command) - node = inkex.etree.SubElement(self.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 - }) - - namedview = self.document.xpath("//sodipodi:namedview", namespaces=inkex.NSS) + inkex.etree.SubElement(self.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 + }) |
