From ccbe040c1f743cf54c98b0ddffff4066a47df9c6 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sun, 28 Feb 2010 17:02:26 +0000 Subject: [PATCH] 3448: Prevent removal of hidden root node svn: r14525 --- src/gui/views/treemodels/treebasemodel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/views/treemodels/treebasemodel.py b/src/gui/views/treemodels/treebasemodel.py index 374b9d80b..fd1e9020f 100644 --- a/src/gui/views/treemodels/treebasemodel.py +++ b/src/gui/views/treemodels/treebasemodel.py @@ -607,7 +607,7 @@ class TreeBaseModel(gtk.GenericTreeModel): node.set_handle(None) self.__displayed -= 1 self.__total -= 1 - else: + elif node.parent: # don't remove the hidden root node path = self.on_get_path(node) self.nodemap.node(node.parent).remove_child(node, self.nodemap) del self.tree[node.ref]