From 50fb140b086a62a055bb080c01224d39db56db45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 7 Jul 2008 11:50:46 +0200 Subject: [PATCH] Improve on_get_iter for issue174 --- tryton/gui/window/view_tree/view_tree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_tree/view_tree.py b/tryton/gui/window/view_tree/view_tree.py index e0e3b8bde1..4121083dbe 100644 --- a/tryton/gui/window/view_tree/view_tree.py +++ b/tryton/gui/window/view_tree/view_tree.py @@ -195,9 +195,9 @@ class ViewTreeModel(gtk.GenericTreeModel, gtk.TreeSortable): '''returns the node corresponding to the given path.''' node = [] tree = self.tree - if self.tree == []: - return None for i in path: + if not tree: + return None node.append((i, tree)) tree = tree[i][2] return node