I'm writing a script which inserts a node and moves the selected node
as a child of the inserted node. At the end of the script I want the
changes to be reflected and so I call c.redraw(). I want the
originally selected node to stay selected, so I call c.redraw(p).
Here is the script I'm testing with:
n = p.insertAfter()
n.h = "test"
g.es('1: exists n: %s, p: %s' % (c.positionExists(n), c.positionExists(p)))
p = p.moveToFirstChildOf(n)
g.es('2: exists n: %s, p: %s' % (c.positionExists(n), c.positionExists(p)))
c.redraw(p)
After executing the above script, the top node in the outline is
selected instead of the previously selected node. How can I keep the
selection on the previously selected node?
I used g.pdb (great tool!) to step into c.redraw and the problem seems
to be that positionExists returns False for both p and n. I'm not
sure why.
Brian
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.