aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-05 09:43:52 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-05 09:43:52 +0000
commit4b1a9333b2c43aa12d5134fbd82b36b593deb066 (patch)
tree69e912dae13bb4cbf644a56747df4bea3bed0c2e
parentf690f742f2007d065b1d8322477c5f1a4010f9e8 (diff)
downloadrpmdrake-4b1a9333b2c43aa12d5134fbd82b36b593deb066.tar
rpmdrake-4b1a9333b2c43aa12d5134fbd82b36b593deb066.tar.gz
rpmdrake-4b1a9333b2c43aa12d5134fbd82b36b593deb066.tar.bz2
rpmdrake-4b1a9333b2c43aa12d5134fbd82b36b593deb066.tar.xz
rpmdrake-4b1a9333b2c43aa12d5134fbd82b36b593deb066.zip
Fix bug #12134: rpmdrake was sometimes rebuilding the tree unnecessarily.
-rwxr-xr-xrpmdrake21
1 files changed, 10 insertions, 11 deletions
diff --git a/rpmdrake b/rpmdrake
index 540d231a..613f0318 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -826,21 +826,20 @@ or you already installed all of them."));
mapn {
my $capture_mode = $_[0];
- $_[0] eq $tree_mode->[0] and $_[1]->set_active(1);
+ $capture_mode eq $tree_mode->[0] and $_[1]->set_active(1);
$_[1]->signal_connect(clicked => sub {
- if ($_[0]->get_active) {
- ($options->{tree_mode}, $options->{state}{flat}) = $capture_mode eq 'by'
- ? ($options->{tree_submode}, $options->{tree_subflat})
- : ($capture_mode, $radios_infos{$capture_mode}{flat});
- $tree_mode->[0] = $options->{tree_mode};
- $tree_flat->[0] = $options->{state}{flat};
- $options->{rebuild_tree}->();
- }
- });
+ if ($options->{tree_mode} ne $capture_mode && $_[0]->get_active) {
+ ($options->{tree_mode}, $options->{state}{flat}) = $capture_mode eq 'by'
+ ? ($options->{tree_submode}, $options->{tree_subflat})
+ : ($capture_mode, $radios_infos{$capture_mode}{flat});
+ $tree_mode->[0] = $options->{tree_mode};
+ $tree_flat->[0] = $options->{state}{flat};
+ $options->{rebuild_tree}->();
+ }
+ });
} \@radios_names_ordered, \@modes_buttons;
my $radio_by;
-
$options->{tree_submode} ||= $advanced_modes[0][0];
each_index {
if ($_ eq 'by') {