summaryrefslogtreecommitdiff
path: root/lib/extensions/object_commands.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2019-02-22 22:07:15 -0500
committerLex Neva <github.com@lexneva.name>2019-03-08 19:57:11 -0500
commit4ba3cd708561870a731d9634d9cdd5c18579cac7 (patch)
treecd901daa9bd9f1901f3dbbca57940a981215267d /lib/extensions/object_commands.py
parent3611e2340997b917cc89e7d405b3c7d9bc86aab5 (diff)
refactor add_commands() out into commands module
Diffstat (limited to 'lib/extensions/object_commands.py')
-rw-r--r--lib/extensions/object_commands.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/extensions/object_commands.py b/lib/extensions/object_commands.py
index 47fb361d..d33ab2ba 100644
--- a/lib/extensions/object_commands.py
+++ b/lib/extensions/object_commands.py
@@ -1,8 +1,8 @@
import inkex
-from .commands import CommandsExtension
-from ..commands import OBJECT_COMMANDS
+from ..commands import OBJECT_COMMANDS, add_commands
from ..i18n import _
+from .commands import CommandsExtension
class ObjectCommands(CommandsExtension):
@@ -24,14 +24,11 @@ class ObjectCommands(CommandsExtension):
inkex.errormsg(_("Please choose one or more commands to attach."))
return
- for command in commands:
- self.ensure_symbol(command)
-
# Each object (node) in the SVG may correspond to multiple Elements of different
# types (e.g. stroke + fill). We only want to process each one once.
seen_nodes = set()
for element in self.elements:
if element.node not in seen_nodes:
- self.add_commands(element, commands)
+ add_commands(element, commands)
seen_nodes.add(element.node)