summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Spike <aaron@ekips.org>2006-05-28 03:50:26 +0000
committeracspike <acspike@users.sourceforge.net>2006-05-28 03:50:26 +0000
commitbed181a8e9f5cd81c87d8b08d2aa8e76a15cb8f1 (patch)
tree4e5fc76783e39b7b789c7c9e96f90b57c1f8268c
parentadd a function to pull some info from the sodipodi:namedview (diff)
downloadinkscape-bed181a8e9f5cd81c87d8b08d2aa8e76a15cb8f1.tar.gz
inkscape-bed181a8e9f5cd81c87d8b08d2aa8e76a15cb8f1.zip
center the tree on the current layer
(bzr r1033)
-rwxr-xr-xshare/extensions/rtree.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/share/extensions/rtree.py b/share/extensions/rtree.py
index a70b2b4c0..5d8ac9f3d 100755
--- a/share/extensions/rtree.py
+++ b/share/extensions/rtree.py
@@ -51,9 +51,12 @@ class RTreeTurtle(inkex.Effect):
'fill': 'none'}
new.setAttribute('style', simplestyle.formatStyle(s))
t = pturtle.pTurtle()
+ t.pu()
+ t.setpos(self.view_center)
+ t.pd()
rtree(t, self.options.size, self.options.minimum)
new.setAttribute('d', t.getPath())
- self.document.documentElement.appendChild(new)
+ self.current_layer.appendChild(new)
e = RTreeTurtle()
e.affect()