3448: Prevent removal of hidden root node

svn: r14525
This commit is contained in:
Nick Hall 2010-02-28 17:02:26 +00:00
parent 6d96f92a00
commit ccbe040c1f

View File

@ -607,7 +607,7 @@ class TreeBaseModel(gtk.GenericTreeModel):
node.set_handle(None) node.set_handle(None)
self.__displayed -= 1 self.__displayed -= 1
self.__total -= 1 self.__total -= 1
else: elif node.parent: # don't remove the hidden root node
path = self.on_get_path(node) path = self.on_get_path(node)
self.nodemap.node(node.parent).remove_child(node, self.nodemap) self.nodemap.node(node.parent).remove_child(node, self.nodemap)
del self.tree[node.ref] del self.tree[node.ref]