Fixes.
--- a/demo_treeview.py Mon Dec 17 23:19:58 2012 +0100
+++ b/demo_treeview.py Mon Dec 17 23:27:37 2012 +0100
@@ -16,9 +16,9 @@
model.add('/', ['a', 'b'])
model.add('/a', ['c', 'd'])
model.add((0,1), ['e', 'f'])
- model.add('/0/1/0', 'g')
+ model.add(['a', 'd', 'e'], 'g')
model.add('/a/d/f', 'h')
-
+
view = TreeView(model)
view.collapse('/a/d')
self.top.add(view)
--- a/tuikit/widget.py Mon Dec 17 23:19:58 2012 +0100
+++ b/tuikit/widget.py Mon Dec 17 23:27:37 2012 +0100
@@ -212,7 +212,7 @@
def hide(self):
'''Hide widget. Convenience method.'''
self.hidden = True
- if self.has_focus():
+ if self.parent and self.has_focus():
self.parent.focus_next()
self.redraw()