From 56abac79cad2cb9d0aff65bd8c1f488cec4a9f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Sat, 19 Jul 2025 09:01:02 +0200 Subject: [PATCH] FIX: Skip cells that have already been computed --- .../src/components/WorksheetCanvas/worksheetCanvas.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/IronCalc/src/components/WorksheetCanvas/worksheetCanvas.ts b/webapp/IronCalc/src/components/WorksheetCanvas/worksheetCanvas.ts index e792ac9..82b1f7e 100644 --- a/webapp/IronCalc/src/components/WorksheetCanvas/worksheetCanvas.ts +++ b/webapp/IronCalc/src/components/WorksheetCanvas/worksheetCanvas.ts @@ -388,13 +388,15 @@ export default class WorksheetCanvas { topLeftCell: Cell, bottomRightCell: Cell, ): void { + const frozenColumnsCount = this.model.getFrozenColumnsCount(selectedSheet); // First compute the text to the left of the viewport const columnToTheLeft = this.model.getLastNonEmptyInRowBeforeColumn( selectedSheet, row, topLeftCell.column, ); - if (columnToTheLeft) { + // If it is one of the frozen columns it is already computed + if (columnToTheLeft && columnToTheLeft > frozenColumnsCount) { const columnWidth = this.getColumnWidth(selectedSheet, columnToTheLeft); const [textX, textY] = this.getCoordinatesByCell(row, columnToTheLeft); this.computeCellText(