From d82f0edeb3cd1448d6dc234b353c516e0b147020 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 3 Jan 2003 19:47:32 +0000 Subject: (create_treeview_list): fix setter --- perl-install/interactive/gtk.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'perl-install/interactive') diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 1ac555907..71d1acff7 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -137,11 +137,12 @@ sub create_treeview_list { my ($v) = @_; eval { my $nb = find_index { $_ eq $v } @{$e->{list}}; - my ($path) = $list_tv->get_cursor; - if ($path) { - $select->($path) if $nb != $path->to_string; + my ($old_path) = $list_tv->get_cursor; + if (!$old_path || $nb != $old_path) { + $select->(my $path = Gtk2::TreePath->new_from_string($nb)); $path->free; } + $old_path->free if $old_path; }; }; } -- cgit v1.2.1