From cae5d8a4be62874d71a3c84d94e94bbfe0df7bad Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sun, 19 Aug 2001 14:52:47 +0000 Subject: (create_ctree): fix focusing (the assumption number of leaves = number of lines is dumb) --- perl-install/interactive_gtk.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index f7e5020d9..58541304c 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -175,9 +175,9 @@ sub create_ctree { for (my $c = $node; $c; $c = $c->row->parent) { $tree->expand($c); } - foreach (0 .. $#l) { - if ($tree->node_nth($_) == $node) { - $tree->set_focus_row($_); + for (my $i = 0; $tree->node_nth($i); $i++) { + if ($tree->node_nth($i) == $node) { + $tree->set_focus_row($i); last; } } -- cgit v1.2.1