summaryrefslogtreecommitdiff
path: root/lib/extensions/global_commands.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-08-24 16:29:13 -0400
committerLex Neva <github.com@lexneva.name>2018-08-24 20:56:41 -0400
commit53f92df05635668783a6b9407a01326de14a1291 (patch)
treebd249267b3cdb965b9c61f644058d679bab48e67 /lib/extensions/global_commands.py
parent7f9208ae2a97026019ff36d28faf37a5c1b9b270 (diff)
add 'Add Commands' extension
Diffstat (limited to 'lib/extensions/global_commands.py')
-rw-r--r--lib/extensions/global_commands.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/extensions/global_commands.py b/lib/extensions/global_commands.py
new file mode 100644
index 00000000..55848be9
--- /dev/null
+++ b/lib/extensions/global_commands.py
@@ -0,0 +1,14 @@
+import inkex
+
+from .layer_commands import LayerCommands
+from ..commands import GLOBAL_COMMANDS
+
+
+# It's a bit weird subclassing this from LayerCommands, but global commands
+# must still be placed in a layer. That means the two extensions
+# do the same thing and the code is the same. We keep this as separate
+# extensions because we want the user to understand that global commands
+# affect the entire document, not just the current layer.
+
+class GlobalCommands(LayerCommands):
+ COMMANDS = GLOBAL_COMMANDS