Skip to content

Commit

Permalink
use 'local' for a flag setting
Browse files Browse the repository at this point in the history
Updates #700
  • Loading branch information
shawnlaffan committed Aug 10, 2018
1 parent 1fa52fa commit 65df866
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Biodiverse/GUI/Tabs/Labels.pm
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,8 @@ sub remove_selected_labels_from_list {
my $model1 = $treeview1->get_model;
my $model2 = $treeview2->get_model;

$self->{ignore_selection_change} = 1;
local $self->{ignore_selection_change} = 1;

$treeview1->set_model(undef);
$treeview2->set_model(undef);

Expand All @@ -546,7 +547,8 @@ sub remove_selected_labels_from_list {
}

# now we delete them
# (cannot delete as we go as the paths and iters are affected by the deletions)
# (cannot delete as we go as the paths and iters
# are affected by the deletions)
foreach my $rowref (@rowrefs) {
my $path = $rowref->get_path;
next if !defined $path;
Expand All @@ -561,8 +563,6 @@ sub remove_selected_labels_from_list {
# need to update the matrix if it is displayed
$self->on_selected_matrix_changed (redraw => 1);

delete $self->{ignore_selection_change};

return;
}

Expand Down

0 comments on commit 65df866

Please sign in to comment.