On Sun, Jan 25, 2009 at 1:27 AM, Jesse Aldridge <[email protected]>wrote:
>
> I fixed the problem with the buttons by adding:
>
> def redraw_after_head_changed(self):
> pass
>
> To the nullTree class.
This seems like a dubious approach. nullTree is a subclass of leoTree.
leoTree.redraw_after_head_changed is simply self.c.redraw(). c.redraw is::
def redraw (self,p=None,setFocus=False):
c = self
if p:
# Update body pane and set c._currentPosition.
c.expandAllAncestors(p) # Redundant, but safe.
c.selectPosition(p)
else:
p = c.currentPosition()
c.expandAllAncestors(p)
c.frame.tree.redraw(p)
if setFocus: c.treeFocusHelper()
True, this does call c.frame.tree.redraw, but c.frame.tree is a nullTree,
and nullTree.redraw is simply a pass.
So my guess is that the problem occurs in c.redraw before calling
c.frame.tree.redraw. Your proposed solution guts, in effect, all the code
in c.redraw. That does not seem like a good idea to me.
Edward
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---