Fixes.
authorRadek Brich <radek.brich@devl.cz>
Mon, 17 Dec 2012 23:27:37 +0100
changeset 39 5e5deb1d3945
parent 38 c6e170452c7f
child 40 5faa38c10b67
Fixes.
demo_treeview.py
tuikit/widget.py
--- 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()