Moved viewbox extension to legacy tools
This commit is contained in:
parent
6ba341e3d1
commit
adbdc6d218
@ -1,16 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
|
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
|
||||||
<name>Set View Box</name>
|
<name>Set View Box</name>
|
||||||
<id>fablabchemnitz.de.setviewbox</id>
|
<id>fablabchemnitz.de.setviewbox</id>
|
||||||
<effect>
|
<effect>
|
||||||
<object-type>rect</object-type>
|
<object-type>rect</object-type>
|
||||||
<effects-menu>
|
<effects-menu>
|
||||||
<submenu name="FabLab Chemnitz">
|
<submenu name="FabLab Chemnitz">
|
||||||
<submenu name="Various"/>
|
<submenu name="Legacy Tools"/>
|
||||||
</submenu>
|
</submenu>
|
||||||
</effects-menu>
|
</effects-menu>
|
||||||
</effect>
|
</effect>
|
||||||
<script>
|
<script>
|
||||||
<command location="inx" interpreter="python">fablabchemnitz_viewbox.py</command>
|
<command location="inx" interpreter="python">fablabchemnitz_viewbox.py</command>
|
||||||
</script>
|
</script>
|
||||||
</inkscape-extension>
|
</inkscape-extension>
|
@ -34,7 +34,7 @@ class SetViewBoxEffect(inkex.Effect):
|
|||||||
def effect(self):
|
def effect(self):
|
||||||
if len(self.svg.selected) != 1:
|
if len(self.svg.selected) != 1:
|
||||||
sys.exit("Error: You must select exactly one rectangle")
|
sys.exit("Error: You must select exactly one rectangle")
|
||||||
elif self.svg.selected[0].tag != inkex.addNS('rect','svg'):
|
if list(self.svg.selected.items())[0][1].tag != inkex.addNS('rect','svg'):
|
||||||
sys.exit("Error: You must select exactly one rectangle")
|
sys.exit("Error: You must select exactly one rectangle")
|
||||||
|
|
||||||
sel = None
|
sel = None
|
||||||
|
Reference in New Issue
Block a user