wxTreeCtrl Change

LOoks like this change is change in handling dumb usage by me:
What I was actually doing was:

1. Create the tree with wxTR_HIDE_ROOT
2. Calling aTree.DeleteChildren(aTree.GetRootItem()) (before I
  added anything to the tree)

3. Adding items to the tree with
  aTree.AppendItem(aTree.GetRootItem(), "Item Text", itemData)
  (before I had added any root item)

4. Repeating steps two and three when data changed.

So I never gave the tree a root item. wxPython 2.4.1.2 didn't
choke on this at all and managed to give me what I wanted.
2.4.2.4 has trouble with it as described in previous messages,
and appears to start treating the first item added explicitly to
the tree (which is visible) as the root.

Easy fix is to always do an AddRoot after creating a tree with
wxTR_HIDE_ROOT. Other easy fix is to empty the tree with
DeleteAllItems() and always add the root when re-filling the
tree.

Al

Sorry to jump in on this so late. I think the change in behavior
might be related to a patch I submitted around that time.

Previously, the MSW version always passed its idea of the root object
to the native control--regardless of whether the root object had been
set or not. Under some conditions, this cause the native control to
crash hard. I changed it to never pass a hidden root object to the
native control, and instead try to handle the request itself.

···

On Sat, Oct 11, 2003 at 01:17:37PM -0700, achrist@easystreet.com wrote:

So I never gave the tree a root item. wxPython 2.4.1.2 didn't
choke on this at all and managed to give me what I wanted.
2.4.2.4 has trouble with it as described in previous messages,
and appears to start treating the first item added explicitly to
the tree (which is visible) as the root.

--
Tim Lesher <tim@lesher.ws>
http://www.lesher.ws