Skip to content

Commit 9d5c676

Browse files
committed
Minor Improvement
1 parent 23cb107 commit 9d5c676

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/PhpSpreadsheet/Worksheet/Worksheet.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,6 @@ public function calculateColumnWidths(): static
685685
{
686686
$activeSheet = $this->getParent()?->getActiveSheetIndex();
687687
$selectedCells = $this->selectedCells;
688-
$activeCell = $this->activeCell;
689688
// initialize $autoSizes array
690689
$autoSizes = [];
691690
foreach ($this->getColumnDimensions() as $colDimension) {
@@ -786,8 +785,7 @@ public function calculateColumnWidths(): static
786785
if ($activeSheet !== null && $activeSheet >= 0) {
787786
$this->getParent()?->setActiveSheetIndex($activeSheet);
788787
}
789-
$this->selectedCells = $selectedCells;
790-
$this->activeCell = $activeCell;
788+
$this->setSelectedCells($selectedCells);
791789

792790
return $this;
793791
}

0 commit comments

Comments
 (0)