Skip to content

Commit

Permalink
Merge pull request kivy#1901 from aspidites/treeview_fix
Browse files Browse the repository at this point in the history
- properly unset the selected_node attribute, which addresses issue kivy#1898
  • Loading branch information
tito committed Feb 24, 2014
2 parents b0ed820 + 6cd736d commit c29102a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kivy/uix/treeview.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ def remove_node(self, node):
nodes = parent.nodes
if node in nodes:
nodes.remove(node)
self._selected_node = None
parent.is_leaf = not bool(len(nodes))
node.parent_node = None
node.unbind(size=self._trigger_layout)
Expand Down Expand Up @@ -487,7 +488,7 @@ def on_touch_down(self, touch):
#
_root = ObjectProperty(None)

_selected_node = ObjectProperty(None)
_selected_node = ObjectProperty(None, allownone=True)

#
# Properties
Expand Down

0 comments on commit c29102a

Please sign in to comment.