From 53f92df05635668783a6b9407a01326de14a1291 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 24 Aug 2018 16:29:13 -0400 Subject: add 'Add Commands' extension --- lib/extensions/global_commands.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/extensions/global_commands.py (limited to 'lib/extensions/global_commands.py') 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 -- cgit v1.2.3 From 77177f9b55f57d1373408b3dc619a53fe45d00ce Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 24 Aug 2018 20:40:56 -0400 Subject: fix style --- lib/extensions/global_commands.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/extensions/global_commands.py') diff --git a/lib/extensions/global_commands.py b/lib/extensions/global_commands.py index 55848be9..9655c7af 100644 --- a/lib/extensions/global_commands.py +++ b/lib/extensions/global_commands.py @@ -1,5 +1,3 @@ -import inkex - from .layer_commands import LayerCommands from ..commands import GLOBAL_COMMANDS -- cgit v1.2.3