Add some debug statements to find cause of bug 4481/4834
svn: r17295
This commit is contained in:
parent
33daf99b33
commit
77cf544636
@ -833,13 +833,21 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
|||||||
"""
|
"""
|
||||||
if not self.tree or not self.tree[None].children:
|
if not self.tree or not self.tree[None].children:
|
||||||
return None
|
return None
|
||||||
|
_LOG.debug('path argument of on_get_iter method %s' % str(path))
|
||||||
node = self.tree[None]
|
node = self.tree[None]
|
||||||
pathlist = list(path)
|
pathlist = list(path)
|
||||||
|
try:
|
||||||
for index in pathlist:
|
for index in pathlist:
|
||||||
if self.__reverse:
|
if self.__reverse:
|
||||||
node = self.nodemap.node(node.children[-index - 1][1])
|
node = self.nodemap.node(node.children[-index - 1][1])
|
||||||
else:
|
else:
|
||||||
node = self.nodemap.node(node.children[index][1])
|
node = self.nodemap.node(node.children[index][1])
|
||||||
|
except IndexError:
|
||||||
|
# From the gtk.TreeModel.get_iter documentation:
|
||||||
|
# This method raises a ValueError exception if path is not a valid
|
||||||
|
# tree path.
|
||||||
|
raise ValueError("list index, %s, out of range; max is %d; reverse is %s" % \
|
||||||
|
(index, len(node.children), self.__reverse))
|
||||||
return node
|
return node
|
||||||
|
|
||||||
def on_get_path(self, node):
|
def on_get_path(self, node):
|
||||||
|
Loading…
Reference in New Issue
Block a user