Browse Source

Fixed a rare layout rendering bug in the Table element.

Marcin Ziąbek 10 months ago
parent
commit
3731b6f0fe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/QuestPDF/Elements/Table/Table.cs

+ 1 - 1
Source/QuestPDF/Elements/Table/Table.cs

@@ -210,7 +210,7 @@ namespace QuestPDF.Elements.Table
                         if (rowBottomOffsets[currentRow - 1] > availableSpace.Height + Size.Epsilon)
                         if (rowBottomOffsets[currentRow - 1] > availableSpace.Height + Size.Epsilon)
                             break;
                             break;
 
 
-                        foreach (var row in Enumerable.Range(cell.Row, cell.Row - currentRow))
+                        foreach (var row in Enumerable.Range(currentRow + 1, cell.Row - (currentRow + 1)))
                             rowBottomOffsets[row] = Math.Max(rowBottomOffsets[row - 1], rowBottomOffsets[row]);
                             rowBottomOffsets[row] = Math.Max(rowBottomOffsets[row - 1], rowBottomOffsets[row]);
                         
                         
                         currentRow = cell.Row;
                         currentRow = cell.Row;