Den 20.06.2011 15:11, skrev Chris Bartlett:
Good to hear it was painless. It goes to show that I should obviously defer to Greg's suggestions more often :)

I see you are calling    treeView.getParent().repaint();
Does the parent need to be repainted, or could you get away with just repainting the TreeView?
Absolutely, that was just another bug. I was in the phone when I wrote it, so my concentration was off :)

Also, bear in mind that there are multiple repaint methods, including the following two which *might* help to optimise repainting. http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Component.html#repaint(org.apache.pivot.wtk.Bounds <http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Component.html#repaint%28org.apache.pivot.wtk.Bounds>, boolean) http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Component.html#repaint(int <http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Component.html#repaint%28int>, int, int, int, boolean)

I though about that, but that means querying for the node bounds before each repaint. This would be the obvious optimization if the repaint is too expensive, but it seems to not matter at all :)

-- Edvin

Reply via email to