enthought / enthought/traitsui
TreeEditor will not expand TreeNode if "auto_open" is not set to True
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
a TreeNode will not be expanded if TreeNode's auto_open attr is not set to True.
this renders the TreeEditor pretty unusable, since it becomes impossible to navigate, when working with a large number of nodes.
The offending code is likely part of the traitsui.qt4.tree_editor.SimpleEditor's "_insert_node" method:
```
# Automatically expand the new node (if requested):
if has_children:
if node.can_auto_open( object ):
cnid.setExpanded(True)
else:
# Qt only draws the control that expands the tree if there is a
# child. As the tree is being populated lazily we create a
# dummy that will be removed when the node is expanded for the
# first time.
cnid._dummy = QtGui.QTreeWidgetItem(cnid)
```
Likely the ._dummy fix is the offending statement here.
Possible this bug is platform dependent, this was tested on OSX
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.