fix 3 one line bugs in treebasemodel
svn: r14068
This commit is contained in:
parent
2a6c915dde
commit
63d9122ea2
@ -150,7 +150,8 @@ class Node(object):
|
|||||||
' not present in self.children: ' + str(self.children)\
|
' not present in self.children: ' + str(self.children)\
|
||||||
+ ' at index ' + str(index)
|
+ ' at index ' + str(index)
|
||||||
if index == 0:
|
if index == 0:
|
||||||
nodemap.node(self.children[index][1]).prev = None
|
if len(self.children) > 1:
|
||||||
|
nodemap.node(self.children[index+1][1]).prev = None
|
||||||
elif index == len(self.children)-1:
|
elif index == len(self.children)-1:
|
||||||
nodemap.node(self.children[index - 1][1]).next = None
|
nodemap.node(self.children[index - 1][1]).next = None
|
||||||
else:
|
else:
|
||||||
@ -604,7 +605,8 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
|||||||
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]
|
||||||
del self.handle2node[node.handle]
|
if node.handle is not None:
|
||||||
|
del self.handle2node[node.handle]
|
||||||
self.nodemap.del_node(node)
|
self.nodemap.del_node(node)
|
||||||
del node
|
del node
|
||||||
self.__displayed -= 1
|
self.__displayed -= 1
|
||||||
|
Loading…
Reference in New Issue
Block a user