diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2018-08-24 20:52:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-24 20:52:28 -0400 |
| commit | 1de8487849a3f8f55d126e2687d690226e657fde (patch) | |
| tree | 1bd891b97f8447cb3f513d073d20cea5d4534461 /lib/extensions/layer_commands.py | |
| parent | b3bb975401fe4971170239eea9b928ee13161398 (diff) | |
| parent | 91eb98cc33602f19dddc186c034aed968e048404 (diff) | |
Merge pull request #288 from inkstitch/lexelby/style
fix coding style and enforce style checks in build
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 + }) |
