Bugfix: changing range-based layer heigths didn't trigger background processing. #2958

This commit is contained in:
Alessandro Ranellucci 2015-07-04 15:22:27 +02:00
parent 440af2c81c
commit e84ead5291

View file

@ -107,12 +107,17 @@ sub new {
$grid->SetCellValue($event->GetRow, $event->GetCol, $value); $grid->SetCellValue($event->GetRow, $event->GetCol, $value);
# if there's no empty row, let's append one # if there's no empty row, let's append one
for my $i (0 .. $grid->GetNumberRows-1) { for my $i (0 .. $grid->GetNumberRows) {
if (!grep $grid->GetCellValue($i, $_), 0..2) { if ($i == $grid->GetNumberRows) {
return; # if we're here then we found no empty row
}
}
$grid->AppendRows(1); $grid->AppendRows(1);
last;
}
if (!grep $grid->GetCellValue($i, $_), 0..2) {
# exit loop if this row is empty
last;
}
}
$self->{layers_changed} = 1; $self->{layers_changed} = 1;
}); });