traitsui: wx tree editor does not change icon when collapsing a node

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

traitsui: wx tree editor does not change icon when collapsing a node

Alexander Held
Hi,

I noticed, that in traitsui, a wx tree editor does not change the icon
of a node, when it is collapsed.
Looking at the code

https://github.com/enthought/traitsui/blob/4fb17322f9e6a8f4562fe86ce183a4f80dfa7e5e/traitsui/wx/tree_editor.py#L875-L891

revealed, that the "is_expanded" parameter is not passed to the
"_update_icon_for_nid" method from "_update_icon".
Instead the expanded state is read by calling "_get_node_data".
But when collapsing a node, the node data does not seem to be updated.
Only when expanding a node, the icon changes but it never changes back
when collapsing the node.

Since I don't know whether the "is_expanded" parameter should be passed
or the node data should be updated instead, or both, I cannot submit a
patch. Could someone please have a look at this?

Cheers
Alexander

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev