[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re[2]: [lmi] Code review: product editor

From: Evgeniy Tarassov
Subject: Re: Re[2]: [lmi] Code review: product editor
Date: Thu, 22 Mar 2007 00:31:06 +0100

On 3/21/07, Vadim Zeitlin <address@hidden> wrote:
On Wed, 21 Mar 2007 18:36:14 +0100 Evgeniy Tarassov <address@hidden> wrote:

ET> I removed it to deal with a potential "bug" in wx. I'm not sure that
ET> wxTreeCtrl guarantees that it will never select a root node when it is
ET> hidden.

 It does, of course. If the root is hidden, it can't be selected by the
user. So while the selection might become invalid (i.e. no selection at
all) it can't be a non-existing item.

I'm sorry -- i have incorrectly employed the word "bug".

What i really meant is that there is a slight probabilty that in a
future release of wx it could happen that event.GetItem returns the
root id, since it is not guaranteed by wxTreeCtrl documentation at the
Imagine a tree with one element, selected by user, which is removed
programmatically. Will the root node (hidden or not) receive
selection? I'd expect an EVT_TREE_SEL_CHANGED event to be generated,
but from WX docs:
 wxTreeItemId GetItem() const
 Returns the item (valid for all events).
Such an event could only return the root node id.

Sorry again for employing an incorrect word.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]